random: crng init done ====================================================== [ INFO: possible circular locking dependency detected ] 4.9.165+ #27 Not tainted ------------------------------------------------------- syz-executor198/2057 is trying to acquire lock: (&p->lock){+.+.+.}, at: [] seq_read+0xd6/0x1250 fs/seq_file.c:178 but task is already holding lock: (&pipe->mutex/1){+.+.+.}, at: [] pipe_lock_nested fs/pipe.c:66 [inline] (&pipe->mutex/1){+.+.+.}, at: [] pipe_lock+0x63/0x80 fs/pipe.c:74 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: lock_acquire+0x133/0x3d0 kernel/locking/lockdep.c:3756 __mutex_lock_common kernel/locking/mutex.c:521 [inline] mutex_lock_nested+0xc7/0x920 kernel/locking/mutex.c:621 __pipe_lock fs/pipe.c:87 [inline] fifo_open+0x15d/0xa00 fs/pipe.c:935 do_dentry_open+0x3ef/0xc80 fs/open.c:766 vfs_open+0x105/0x230 fs/open.c:879 do_last fs/namei.c:3457 [inline] path_openat+0xbf5/0x2f60 fs/namei.c:3581 do_filp_open+0x1a1/0x280 fs/namei.c:3615 do_open_execat+0x10c/0x6a0 fs/exec.c:844 do_execveat_common.isra.0+0x698/0x1db0 fs/exec.c:1723 do_execve fs/exec.c:1829 [inline] SYSC_execve fs/exec.c:1910 [inline] SyS_execve+0x42/0x50 fs/exec.c:1905 do_syscall_64+0x1ad/0x570 arch/x86/entry/common.c:285 entry_SYSCALL_64_after_swapgs+0x5d/0xdb lock_acquire+0x133/0x3d0 kernel/locking/lockdep.c:3756 __mutex_lock_common kernel/locking/mutex.c:521 [inline] mutex_lock_killable_nested+0xcd/0xa10 kernel/locking/mutex.c:641 lock_trace+0x44/0xc0 fs/proc/base.c:431 proc_pid_syscall+0x9b/0x250 fs/proc/base.c:663 proc_single_show+0xf6/0x160 fs/proc/base.c:785 seq_read+0x4cd/0x1250 fs/seq_file.c:240 do_loop_readv_writev.part.0+0xcc/0x2c0 fs/read_write.c:720 do_loop_readv_writev fs/read_write.c:709 [inline] do_readv_writev+0x556/0x7a0 fs/read_write.c:875 vfs_readv+0x86/0xc0 fs/read_write.c:899 kernel_readv fs/splice.c:363 [inline] default_file_splice_read+0x44b/0x7e0 fs/splice.c:435 do_splice_to+0x108/0x170 fs/splice.c:899 splice_direct_to_actor+0x246/0x820 fs/splice.c:971 do_splice_direct+0x1a5/0x260 fs/splice.c:1080 do_sendfile+0x503/0xc00 fs/read_write.c:1395 SYSC_sendfile64 fs/read_write.c:1456 [inline] SyS_sendfile64+0x145/0x160 fs/read_write.c:1442 do_syscall_64+0x1ad/0x570 arch/x86/entry/common.c:285 entry_SYSCALL_64_after_swapgs+0x5d/0xdb check_prev_add kernel/locking/lockdep.c:1828 [inline] check_prevs_add kernel/locking/lockdep.c:1938 [inline] validate_chain kernel/locking/lockdep.c:2265 [inline] __lock_acquire+0x2d10/0x4350 kernel/locking/lockdep.c:3345 lock_acquire+0x133/0x3d0 kernel/locking/lockdep.c:3756 __mutex_lock_common kernel/locking/mutex.c:521 [inline] mutex_lock_nested+0xc7/0x920 kernel/locking/mutex.c:621 seq_read+0xd6/0x1250 fs/seq_file.c:178 proc_reg_read+0xfd/0x180 fs/proc/inode.c:203 do_loop_readv_writev.part.0+0xcc/0x2c0 fs/read_write.c:720 do_loop_readv_writev fs/read_write.c:709 [inline] do_readv_writev+0x556/0x7a0 fs/read_write.c:875 vfs_readv+0x86/0xc0 fs/read_write.c:899 kernel_readv fs/splice.c:363 [inline] default_file_splice_read+0x44b/0x7e0 fs/splice.c:435 do_splice_to+0x108/0x170 fs/splice.c:899 do_splice fs/splice.c:1192 [inline] SYSC_splice fs/splice.c:1416 [inline] SyS_splice+0x1061/0x1480 fs/splice.c:1399 do_syscall_64+0x1ad/0x570 arch/x86/entry/common.c:285 entry_SYSCALL_64_after_swapgs+0x5d/0xdb other info that might help us debug this: Chain exists of: Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&pipe->mutex/1); lock(&sig->cred_guard_mutex); lock(&pipe->mutex/1); lock(&p->lock); *** DEADLOCK *** 1 lock held by syz-executor198/2057: #0: (&pipe->mutex/1){+.+.+.}, at: [] pipe_lock_nested fs/pipe.c:66 [inline] #0: (&pipe->mutex/1){+.+.+.}, at: [] pipe_lock+0x63/0x80 fs/pipe.c:74 stack backtrace: CPU: 1 PID: 2057 Comm: syz-executor198 Not tainted 4.9.165+ #27 ffff8801ce4a72f8 ffffffff81b4ba01 ffffffff83caa9a0 ffffffff83cb0310 ffffffff83ca9050 ffffffff8424ac80 ffff8801d1ed97c0 ffff8801ce4a7350 ffffffff81400f3c ffffffff810aba10 ffffffff84022d00 ffff8801d1eda098 Call Trace: [] __dump_stack lib/dump_stack.c:15 [inline] [] dump_stack+0xc1/0x120 lib/dump_stack.c:51 [] print_circular_bug.cold+0x2f6/0x454 kernel/locking/lockdep.c:1202 [] check_prev_add kernel/locking/lockdep.c:1828 [inline] [] check_prevs_add kernel/locking/lockdep.c:1938 [inline] [] validate_chain kernel/locking/lockdep.c:2265 [inline] [] __lock_acquire+0x2d10/0x4350 kernel/locking/lockdep.c:3345 [] lock_acquire+0x133/0x3d0 kernel/locking/lockdep.c:3756 [] __mutex_lock_common kernel/locking/mutex.c:521 [inline] [] mutex_lock_nested+0xc7/0x920 kernel/locking/mutex.c:621 [] seq_read+0xd6/0x1250 fs/seq_file.c:178 [] proc_reg_read+0xfd/0x180 fs/proc/inode.c:203 [] do_loop_readv_writev.part.0+0xcc/0x2c0 fs/read_write.c:720 [] do_loop_readv_writev fs/read_write.c:709 [inline] [] do_readv_writev+0x556/0x7a0 fs/read_write.c:875 [] vfs_readv+0x86/0xc0 fs/read_write.c:899 [] kernel_readv fs/splice.c:363 [inline] [] default_file_splice_read+0x44b/0x7e0 fs/splice.c:435 [] do_splice_to+0x108/0x170 fs/splice.c:899 [] do_splice fs/splice.c:1192 [inline] [] SYSC_splice fs/splice.c:1416 [inline] [] SyS_splice+0x1061/0x1480 fs/splice.c:1399 [] do_syscall_64+0x1ad/0x570 arch/x86/entry/common.c:285 [] entry_SYSCALL_64_after_swapgs+0x5d/0xdb