====================================================== WARNING: possible circular locking dependency detected 4.14.97+ #4 Not tainted ------------------------------------------------------ syz-executor5/6504 is trying to acquire lock: (&p->lock){+.+.}, at: [] seq_read+0xcd/0x1180 fs/seq_file.c:165 but task is already holding lock: (&sig->cred_guard_mutex){+.+.}, at: [] prepare_bprm_creds+0x51/0x110 fs/exec.c:1389 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 (&sig->cred_guard_mutex){+.+.}: -> #0 (&p->lock){+.+.}: other info that might help us debug this: Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&sig->cred_guard_mutex); lock(&p->lock); lock(&sig->cred_guard_mutex); lock(&p->lock); *** DEADLOCK *** 1 lock held by syz-executor5/6504: #0: (&sig->cred_guard_mutex){+.+.}, at: [] prepare_bprm_creds+0x51/0x110 fs/exec.c:1389 stack backtrace: CPU: 0 PID: 6504 Comm: syz-executor5 Not tainted 4.14.97+ #4 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: 6529:6532 unknown command 570450701 binder: 6529:6532 ioctl c0306201 20000180 returned -22 binder: 6529:6541 ioctl 5419 20000200 returned -22 binder: 6529:6532 unknown command 570450701 binder: 6529:6541 ioctl 5419 20000200 returned -22 binder: 6529:6532 ioctl c0306201 20000180 returned -22 binder: 6562:6566 unknown command 570450701 binder: 6558:6569 unknown command 570450701 binder: 6562:6566 ioctl c0306201 20000180 returned -22 binder: 6558:6569 ioctl c0306201 20000180 returned -22 binder: 6560:6567 unknown command 570450701 binder: 6562:6566 ioctl 5419 20000200 returned -22 binder: 6560:6567 ioctl c0306201 20000180 returned -22 binder: 6558:6569 ioctl 5419 20000200 returned -22 binder: 6560:6567 ioctl 5419 20000200 returned -22 binder: 6587:6592 unknown command 570450701 binder: 6587:6592 ioctl c0306201 20000180 returned -22 binder: 6601:6603 unknown command 570450701 binder: 6587:6604 ioctl 5419 20000200 returned -22 binder: 6601:6603 ioctl c0306201 20000180 returned -22 binder: 6601:6612 ioctl 5419 20000200 returned -22 binder: 6619:6622 unknown command 570450701 binder: 6619:6622 ioctl c0306201 20000180 returned -22 binder: 6619:6631 ioctl 5419 20000200 returned -22 binder: 6633:6644 unknown command 570450701 binder: 6633:6644 ioctl c0306201 20000180 returned -22 binder: 6633:6655 ioctl 5419 20000200 returned -22 binder: 6657:6659 unknown command 570450701 binder: 6657:6659 ioctl c0306201 20000180 returned -22 binder: 6657:6659 ioctl 5419 20000200 returned -22 binder: 6670:6673 unknown command 570450701 binder: 6670:6673 ioctl c0306201 20000180 returned -22 binder: 6670:6673 ioctl 5419 20000200 returned -22 binder: 6691:6693 unknown command 570450701 binder: 6691:6693 ioctl c0306201 20000180 returned -22 binder: 6687:6698 unknown command 570450701 binder: 6687:6698 ioctl c0306201 20000180 returned -22 binder: 6691:6693 ioctl 5419 20000200 returned -22 binder: 6687:6698 ioctl 5419 20000200 returned -22 binder: 6717:6719 unknown command 570450701 binder: 6716:6720 unknown command 570450701 binder: 6717:6719 ioctl c0306201 20000180 returned -22 binder: 6716:6720 ioctl c0306201 20000180 returned -22 binder: 6717:6719 ioctl 5419 20000200 returned -22 binder: 6722:6724 unknown command 570450701 binder: 6716:6720 ioctl 5419 20000200 returned -22 binder: 6722:6724 ioctl c0306201 20000180 returned -22 binder: 6722:6724 ioctl 5419 20000200 returned -22 binder: 6732:6738 unknown command 570450701 binder: 6729:6739 unknown command 570450701 binder: 6732:6738 ioctl c0306201 20000180 returned -22 binder: 6729:6739 ioctl c0306201 20000180 returned -22 binder: 6754:6758 unknown command 570450701 binder: 6754:6758 ioctl c0306201 20000180 returned -22 binder: 6770:6775 unknown command 570450701 binder: 6770:6775 ioctl c0306201 20000180 returned -22 binder: 6809:6812 unknown command 570450701 binder: 6809:6812 ioctl c0306201 20000180 returned -22 binder: 6909:6913 unknown command 570450701 binder: 6909:6913 ioctl c0306201 20000180 returned -22 binder: 6949:6954 unknown command 570450701 binder: 6949:6954 ioctl c0306201 20000180 returned -22 binder: 6964:6969 unknown command 570450701 binder: 6964:6969 ioctl c0306201 20000180 returned -22 binder: 7085:7092 ioctl c0306201 0 returned -14 binder: 7110:7112 ioctl c0306201 0 returned -14