====================================================== [ INFO: possible circular locking dependency detected ] 4.4.169+ #7 Not tainted ------------------------------------------------------- syz-executor271/2080 is trying to acquire lock: (&pipe->mutex/1){+.+.+.}, at: [] __pipe_lock fs/pipe.c:86 [inline] (&pipe->mutex/1){+.+.+.}, at: [] fifo_open+0x15c/0x9e0 fs/pipe.c:896 but task is already holding lock: (&sig->cred_guard_mutex){+.+.+.}, at: [] prepare_bprm_creds+0x53/0x110 fs/exec.c:1225 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_interruptible_nested+0xd2/0xcc0 kernel/locking/mutex.c:650 [] proc_pid_attr_write+0x19e/0x290 fs/proc/base.c:2524 [] __vfs_write+0x11c/0x3e0 fs/read_write.c:489 [] __kernel_write+0x10a/0x350 fs/read_write.c:511 [] write_pipe_buf+0x15d/0x1f0 fs/splice.c:1074 [] splice_from_pipe_feed fs/splice.c:776 [inline] [] __splice_from_pipe+0x364/0x790 fs/splice.c:901 [] splice_from_pipe+0xf9/0x170 fs/splice.c:936 [] default_file_splice_write+0x3c/0x80 fs/splice.c:1086 [] do_splice_from fs/splice.c:1128 [inline] [] do_splice fs/splice.c:1404 [inline] [] SYSC_splice fs/splice.c:1707 [inline] [] SyS_splice+0xde1/0x1430 fs/splice.c:1690 [] do_syscall_32_irqs_on arch/x86/entry/common.c:330 [inline] [] do_fast_syscall_32+0x321/0xa80 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+0x3cd4/0x5530 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+0xc2/0xb60 kernel/locking/mutex.c:621 [] __pipe_lock fs/pipe.c:86 [inline] [] fifo_open+0x15c/0x9e0 fs/pipe.c:896 [] do_dentry_open+0x38d/0xbd0 fs/open.c:749 [] vfs_open+0x12a/0x210 fs/open.c:862 [] do_last fs/namei.c:3269 [inline] [] path_openat+0xc10/0x3f10 fs/namei.c:3406 [] do_filp_open+0x197/0x270 fs/namei.c:3440 [] do_open_execat+0x10f/0x6f0 fs/exec.c:805 [] do_execveat_common.isra.14+0x6a1/0x1f00 fs/exec.c:1577 [] compat_do_execve fs/exec.c:1710 [inline] [] C_SYSC_execve fs/exec.c:1785 [inline] [] compat_SyS_execve+0x48/0x60 fs/exec.c:1781 [] do_syscall_32_irqs_on arch/x86/entry/common.c:330 [inline] [] do_fast_syscall_32+0x321/0xa80 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(&sig->cred_guard_mutex); lock(&pipe->mutex/1); lock(&sig->cred_guard_mutex); lock(&pipe->mutex/1); *** DEADLOCK *** 1 lock held by syz-executor271/2080: #0: (&sig->cred_guard_mutex){+.+.+.}, at: [] prepare_bprm_creds+0x53/0x110 fs/exec.c:1225 stack backtrace: CPU: 1 PID: 2080 Comm: syz-executor271 Not tainted 4.4.169+ #7 0000000000000000 33818f5bce0613aa ffff8801d410f460 ffffffff81aa635d ffffffff83ab92b0 ffffffff83ab92b0 ffff8800b79c2f80 ffffffff83ab2500 ffff8800b79c3868 ffff8801d410f4b0 ffffffff813a9589 ffff8800b79c2f80 Call Trace: [] __dump_stack lib/dump_stack.c:15 [inline] [] dump_stack+0xc1/0x124 lib/dump_stack.c:51 [] print_circular_bug.cold.31+0x2f6/0x435 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+0x3cd4/0x5530 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+0xc2/0xb60 kernel/locking/mutex.c:621 [] __pipe_lock fs/pipe.c:86 [inline] [] fifo_open+0x15c/0x9e0 fs/pipe.c:896 [] do_dentry_open+0x38d/0xbd0 fs/open.c:749 [] vfs_open+0x12a/0x210 fs/open.c:862 [] do_last fs/namei.c:3269 [inline] [] path_openat+0xc10/0x3f10 fs/namei.c:3406 [] do_filp_open+0x197/0x270 fs/namei.c:3440 [] do_open_execat+0x10f/0x6f0 fs/exec.c:805 [] do_execv