====================================================== [ INFO: possible circular locking dependency detected ] 4.4.174+ #17 Not tainted ------------------------------------------------------- syz-executor.4/5691 is trying to acquire lock: (&sig->cred_guard_mutex){+.+.+.}, at: [] mm_access+0x4f/0x140 kernel/fork.c:857 but task is already holding lock: (&p->lock){+.+.+.}, at: [] seq_read+0xd6/0x1240 fs/seq_file.c:178 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_nested+0xc1/0xb80 kernel/locking/mutex.c:621 [] seq_read+0xd6/0x1240 fs/seq_file.c:178 [] __vfs_read+0x116/0x3c0 fs/read_write.c:434 [] vfs_read+0x134/0x360 fs/read_write.c:456 [] kernel_read+0x11c/0x1f0 fs/exec.c:854 [] prepare_binprm fs/exec.c:1400 [inline] [] prepare_binprm+0x577/0x770 fs/exec.c:1387 [] do_execveat_common.isra.0+0xd86/0x1e90 fs/exec.c:1620 [] compat_do_execveat fs/exec.c:1726 [inline] [] C_SYSC_execveat fs/exec.c:1796 [inline] [] compat_SyS_execveat+0x5b/0x70 fs/exec.c:1788 [] do_syscall_32_irqs_on arch/x86/entry/common.c:330 [inline] [] do_fast_syscall_32+0x32d/0xa90 arch/x86/entry/common.c:397 [] sysenter_flags_fixed+0xd/0x1a [] 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+0x37d6/0x4f50 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_killable_nested+0xd2/0xd00 kernel/locking/mutex.c:641 [] mm_access+0x4f/0x140 kernel/fork.c:857 [] proc_pid_auxv+0x25/0xd0 fs/proc/base.c:409 [] proc_single_show+0xf6/0x160 fs/proc/base.c:805 [] seq_read+0x4cd/0x1240 fs/seq_file.c:240 [] do_loop_readv_writev+0x148/0x1e0 fs/read_write.c:682 [] do_readv_writev+0x573/0x6e0 fs/read_write.c:812 [] vfs_readv+0x7a/0xb0 fs/read_write.c:836 [] kernel_readv fs/splice.c:586 [inline] [] default_file_splice_read+0x3ac/0x8b0 fs/splice.c:662 [] do_splice_to+0xff/0x160 fs/splice.c:1154 [] splice_direct_to_actor+0x249/0x850 fs/splice.c:1226 [] do_splice_direct+0x1a5/0x260 fs/splice.c:1337 [] do_sendfile+0x4ed/0xba0 fs/read_write.c:1229 [] C_SYSC_sendfile fs/read_write.c:1311 [inline] [] compat_SyS_sendfile+0x144/0x160 fs/read_write.c:1294 [] do_syscall_32_irqs_on arch/x86/entry/common.c:330 [inline] [] do_fast_syscall_32+0x32d/0xa90 arch/x86/entry/common.c:397 [] sysenter_flags_fixed+0xd/0x1a other info that might help us debug this: Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&p->lock); lock(&sig->cred_guard_mutex); lock(&p->lock); lock(&sig->cred_guard_mutex); *** DEADLOCK *** 2 locks held by syz-executor.4/5691: #0: (sb_writers#7){.+.+.+}, at: [] file_start_write include/linux/fs.h:2543 [inline] #0: (sb_writers#7){.+.+.+}, at: [] do_sendfile+0x8a6/0xba0 fs/read_write.c:1228 #1: (&p->lock){+.+.+.}, at: [] seq_read+0xd6/0x1240 fs/seq_file.c:178 stack backtrace: CPU: 1 PID: 5691 Comm: syz-executor.4 Not tainted 4.4.174+ #17 0000000000000000 82634e633d4c7e58 ffff8801d9046e70 ffffffff81aad1a1 ffffffff84057a80 ffff8801c19a2f80 ffffffff83ab66b0 ffffffff83ab8000 ffffffff83ab66b0 ffff8801d9046ec0 ffffffff813abcda ffff8801d9046fa0 Call Trace: [] __dump_stack lib/dump_stack.c:15 [inline] [] dump_stack+0xc1/0x120 lib/dump_stack.c:51 [] print_circular_bug.cold+0x2f7/0x44e 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+0x37d6/0x4f50 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_killable_nested+0xd2/0xd00 kernel/locking/mutex.c:641 [] mm_access+0x4f/0x140 kernel/fork.c:857 [] proc_pid_auxv+0x25/0xd0 fs/proc/base.c:409 [] proc_single_show+0xf6/0x160 fs/proc/base.c:805 [] seq_read+0x4cd/0x1240 fs/seq_file.c:240 [] do_loop_readv_writev+0x148/0x1e0 fs/read_write.c:682 [] do_readv_writev+0x573/0x6e0 fs/read_write.c:812 [] vfs_readv+0x7a/0xb0 fs/read_write.c:836 [] kernel_readv fs/splice.c:586 [inline] [] default_file_splice_read+0x3ac/0x8b0 fs/splice.c:662 [] do_splice_to+0xff/0x160 fs/splice.c:1154 [] splice_direct_to_actor+0x249/0x850 fs/splice.c:1226 [] do_splice_direct+0x1a5/0x260 fs/splice.c:1337 [] do_sendfile+0x4ed/0xba0 fs/read_write.c:1229 [] C_SYSC_sendfile fs/read_write.c:1311 [inline] [] compat_SyS_sendfile+0x144/0x160 fs/read_write.c:1294 [] do_syscall_32_irqs_on arch/x86/entry/common.c:330 [inline] [] do_fast_syscall_32+0x32d/0xa90 arch/x86/entry/common.c:397 [] sysenter_flags_fixed+0xd/0x1a