====================================================== [ INFO: possible circular locking dependency detected ] 4.4.132-g4f75c34 #42 Not tainted ------------------------------------------------------- syz-executor5/8009 is trying to acquire lock: (&p->lock){+.+.+.}, at: [] seq_read+0xdd/0x12d0 fs/seq_file.c:178 but task is already holding lock: (&sig->cred_guard_mutex){+.+.+.}, at: [] prepare_bprm_creds+0x53/0x110 fs/exec.c:1221 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: [] lock_acquire+0x15e/0x450 kernel/locking/lockdep.c:3592 [] __mutex_lock_common kernel/locking/mutex.c:521 [inline] [] mutex_lock_killable_nested+0xcc/0x980 kernel/locking/mutex.c:641 [] lock_trace+0x44/0xc0 fs/proc/base.c:446 [] proc_pid_syscall+0xa9/0x260 fs/proc/base.c:667 [] proc_single_show+0xfd/0x170 fs/proc/base.c:789 [] seq_read+0x4b6/0x12d0 fs/seq_file.c:240 [] __vfs_read+0x11c/0x3e0 fs/read_write.c:432 [] vfs_read+0x130/0x360 fs/read_write.c:454 [] SYSC_pread64 fs/read_write.c:607 [inline] [] SyS_pread64+0x145/0x170 fs/read_write.c:594 [] sys32_pread+0x39/0x50 arch/x86/ia32/sys_ia32.c:179 [] do_syscall_32_irqs_on arch/x86/entry/common.c:392 [inline] [] do_fast_syscall_32+0x326/0x8b0 arch/x86/entry/common.c:459 [] sysenter_flags_fixed+0xd/0x17 [] check_prev_add kernel/locking/lockdep.c:1853 [inline] [] check_prevs_add kernel/locking/lockdep.c:1958 [inline] [] validate_chain kernel/locking/lockdep.c:2144 [inline] [] __lock_acquire+0x3902/0x5270 kernel/locking/lockdep.c:3213 [] lock_acquire+0x15e/0x450 kernel/locking/lockdep.c:3592 [] __mutex_lock_common kernel/locking/mutex.c:521 [inline] [] mutex_lock_nested+0xbb/0x850 kernel/locking/mutex.c:621 [] seq_read+0xdd/0x12d0 fs/seq_file.c:178 [] __vfs_read+0x11c/0x3e0 fs/read_write.c:432 [] vfs_read+0x130/0x360 fs/read_write.c:454 [] kernel_read+0xf3/0x1a0 fs/exec.c:849 [] prepare_binprm+0x577/0x750 fs/exec.c:1396 [] do_execveat_common.isra.36+0xed3/0x1f10 fs/exec.c:1616 [] compat_do_execveat fs/exec.c:1722 [inline] [] C_SYSC_execveat fs/exec.c:1792 [inline] [] compat_SyS_execveat+0x5b/0x70 fs/exec.c:1784 [] do_syscall_32_irqs_on arch/x86/entry/common.c:392 [inline] [] do_fast_syscall_32+0x326/0x8b0 arch/x86/entry/common.c:459 [] sysenter_flags_fixed+0xd/0x17 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/8009: #0: (&sig->cred_guard_mutex){+.+.+.}, at: [] prepare_bprm_creds+0x53/0x110 fs/exec.c:1221 stack backtrace: CPU: 0 PID: 8009 Comm: syz-executor5 Not tainted 4.4.132-g4f75c34 #42 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 0000000000000000 9c1f8eb17c9e2989 ffff8801bac9f608 ffffffff81e0df8d ffffffff853d0060 ffffffff8539e3e0 ffffffff853d0060 ffff8801d60de900 ffff8801d60de000 ffff8801bac9f650 ffffffff8140e30b 0000000000000001 Call Trace: [] __dump_stack lib/dump_stack.c:15 [inline] [] dump_stack+0xc1/0x124 lib/dump_stack.c:51 [] print_circular_bug.cold.50+0x1bd/0x27d kernel/locking/lockdep.c:1226 [] check_prev_add kernel/locking/lockdep.c:1853 [inline] [] check_prevs_add kernel/locking/lockdep.c:1958 [inline] [] validate_chain kernel/locking/lockdep.c:2144 [inline] [] __lock_acquire+0x3902/0x5270 kernel/locking/lockdep.c:3213 [] lock_acquire+0x15e/0x450 kernel/locking/lockdep.c:3592 [] __mutex_lock_common kernel/locking/mutex.c:521 [inline] [] mutex_lock_nested+0xbb/0x850 kernel/locking/mutex.c:621 [] seq_read+0xdd/0x12d0 fs/seq_file.c:178 [] __vfs_read+0x11c/0x3e0 fs/read_write.c:432 [] vfs_read+0x130/0x360 fs/read_write.c:454 [] kernel_read+0xf3/0x1a0 fs/exec.c:849 [] prepare_binprm+0x577/0x750 fs/exec.c:1396 [] do_execveat_common.isra.36+0xed3/0x1f10 fs/exec.c:1616 [] compat_do_execveat fs/exec.c:1722 [inline] [] C_SYSC_execveat fs/exec.c:1792 [inline] [] compat_SyS_execveat+0x5b/0x70 fs/exec.c:1784 [] do_syscall_32_irqs_on arch/x86/entry/common.c:392 [inline] [] do_fast_syscall_32+0x326/0x8b0 arch/x86/entry/common.c:459 [] sysenter_flags_fixed+0xd/0x17