====================================================== WARNING: possible circular locking dependency detected 4.14.94+ #12 Not tainted ------------------------------------------------------ syz-executor1/16656 is trying to acquire lock: (&sig->cred_guard_mutex){+.+.}, at: [] lock_trace+0x3f/0xc0 fs/proc/base.c:408 but task is already holding lock: binder: 16663:16666 unknown command 536870912 (&p->lock){+.+.}, at: [] seq_read+0xcd/0x1180 fs/seq_file.c:165 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #2 (&p->lock){+.+.}: -> #1 (&pipe->mutex/1){+.+.}: -> #0 (&sig->cred_guard_mutex binder: 16663:16666 ioctl c0306201 20000440 returned -22 ){+.+.}: other info that might help us debug this: Chain exists of: &sig->cred_guard_mutex --> &pipe->mutex/1 --> &p->lock Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&p->lock); lock(&pipe->mutex/1); lock(&p->lock); lock(&sig->cred_guard_mutex); *** DEADLOCK *** 1 lock held by syz-executor1/16656: #0: (&p->lock){+.+.}, at: [] seq_read+0xcd/0x1180 fs/seq_file.c:165 stack backtrace: binder: 16663:16679 unknown command 536870912 CPU: 0 PID: 16656 Comm: syz-executor1 Not tainted 4.14.94+ #12 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0xb9/0x10e lib/dump_stack.c:53 print_circular_bug.isra.0.cold+0x2dc/0x425 kernel/locking/lockdep.c:1258 binder: 16663:16679 ioctl c0306201 20000440 returned -22 binder: 16683:16684 ioctl 6612 0 returned -22 binder: 16683:16684 unknown command 536871488 binder: 16683:16684 ioctl c0306201 20000440 returned -22 binder: 16683:16684 ioctl 6612 0 returned -22 binder: 16686:16687 unknown command 536871488 binder: 16686:16687 ioctl c0306201 20000440 returned -22 binder: 16686:16690 unknown command 536871488 binder: 16686:16690 ioctl c0306201 20000440 returned -22 binder: 16713:16716 unknown command 536870912 binder: 16713:16716 ioctl c0306201 20000440 returned -22 binder: 16727:16732 unknown command 536871488 binder: 16727:16732 ioctl c0306201 20000440 returned -22 binder: 16727:16744 unknown command 536871488 binder: 16727:16744 ioctl c0306201 20000440 returned -22 binder: 16750:16753 unknown command 536871488 binder: 16750:16753 ioctl c0306201 20000440 returned -22 binder: 16780:16786 unknown command 808482864 binder: 16780:16786 ioctl c0306201 200002c0 returned -22 binder: 16840:16843 unknown command 536870912 binder: 16840:16843 ioctl c0306201 20000440 returned -22 binder: 16856:16864 unknown command 536870912 binder: 16856:16864 ioctl c0306201 20000440 returned -22 binder: 16856:16864 unknown command 536870912 binder: 16856:16864 ioctl c0306201 20000440 returned -22 binder: 16896:16904 unknown command 536871104 binder: 16896:16904 ioctl c0306201 20000440 returned -22 binder: 16923:16929 unknown command 536871488 binder: 16923:16929 ioctl c0306201 20000440 returned -22 binder: 16968:16976 unknown command 536871488 input: syz0 as /devices/virtual/input/input39 binder: 16968:16976 ioctl c0306201 20000440 returned -22 uinput: write device info first binder: 16968:16976 unknown command 536871488 binder: 16968:16976 ioctl c0306201 20000440 returned -22 binder: 16990:16999 unknown command 536871488 binder: 16990:16999 ioctl c0306201 20000440 returned -22 binder: 17025:17032 unknown command 536871488 binder: 17025:17032 ioctl c0306201 20000440 returned -22 binder: 17051:17055 unknown command 536871488 binder: 17051:17055 ioctl c0306201 20000440 returned -22 binder: 17051:17055 ioctl 40082406 20000000 returned -22 binder: 17051:17100 unknown command 536871488 binder: 17051:17100 ioctl c0306201 20000440 returned -22 binder: 17051:17100 ioctl 40082406 20000000 returned -22 binder: 17123:17128 unknown command 536870912 binder: 17123:17128 ioctl c0306201 20000440 returned -22 binder: 17141:17147 unknown command 536871488 binder: 17141:17147 ioctl c0306201 20000440 returned -22 binder: 17141:17156 unknown command 536871488 binder: 17141:17156 ioctl c0306201 20000440 returned -22 binder: 17164:17170 unknown command 536871488 binder: 17164:17170 ioctl c0306201 20000440 returned -22 binder: 17164:17190 unknown command 536871488 binder: 17164:17190 ioctl c0306201 20000440 returned -22 binder: 17212:17214 unknown command 536871488 binder: 17212:17214 ioctl c0306201 20000440 returned -22 binder: 17212:17214 unknown command 536871488 binder: 17212:17214 ioctl c0306201 20000440 returned -22 binder: 17222:17229 unknown command 536870912 binder: 17222:17229 ioctl c0306201 20000440 returned -22 binder: 17247:17253 unknown command 536871040 binder: 17247:17253 ioctl c0306201 20000440 returned -22 binder: 17247:17261 unknown command 536871040 binder: 17247:17261 ioctl c0306201 20000440 returned -22