====================================================== [ INFO: possible circular locking dependency detected ] 4.9.194+ #0 Not tainted ------------------------------------------------------- syz-executor.4/28153 is trying to acquire lock: (&sig->cred_guard_mutex){+.+.+.}, at: [<000000008018428d>] lock_trace+0x44/0xc0 fs/proc/base.c:431 but task is already holding lock: (&p->lock){+.+.+.}, at: [<00000000eef24186>] seq_read+0xd6/0x1250 fs/seq_file.c:178 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 seq_read+0xd6/0x1250 fs/seq_file.c:178 __vfs_read+0x116/0x550 fs/read_write.c:451 vfs_read+0x137/0x380 fs/read_write.c:474 kernel_read+0x103/0x1b0 fs/exec.c:893 prepare_binprm fs/exec.c:1549 [inline] prepare_binprm+0x575/0x770 fs/exec.c:1536 do_execveat_common.isra.0+0xd09/0x1db0 fs/exec.c:1766 do_execveat fs/exec.c:1840 [inline] SYSC_execveat fs/exec.c:1921 [inline] SyS_execveat+0x55/0x70 fs/exec.c:1913 do_syscall_64+0x1ad/0x5c0 arch/x86/entry/common.c:288 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+0x2d22/0x4390 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_killable_nested+0xcd/0xa10 kernel/locking/mutex.c:641 lock_trace+0x44/0xc0 fs/proc/base.c:431 proc_pid_stack+0x12b/0x290 fs/proc/base.c:481 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:721 do_loop_readv_writev fs/read_write.c:710 [inline] do_readv_writev+0x556/0x7a0 fs/read_write.c:876 binder: 28111:28113 ioctl 4018620d 0 returned -22 vfs_readv+0x86/0xc0 fs/read_write.c:900 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:1402 SYSC_sendfile64 fs/read_write.c:1463 [inline] SyS_sendfile64+0x145/0x160 fs/read_write.c:1449 do_syscall_64+0x1ad/0x5c0 arch/x86/entry/common.c:288 entry_SYSCALL_64_after_swapgs+0x5d/0xdb 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/28153: #0: (sb_writers#7){.+.+.+}, at: [<000000003a739b2f>] file_start_write include/linux/fs.h:2646 [inline] #0: (sb_writers#7){.+.+.+}, at: [<000000003a739b2f>] do_sendfile+0x93a/0xc00 fs/read_write.c:1401 #1: (&p->lock){+.+.+.}, at: [<00000000eef24186>] seq_read+0xd6/0x1250 fs/seq_file.c:178 stack backtrace: CPU: 0 PID: 28153 Comm: syz-executor.4 Not tainted 4.9.194+ #0 ffff8801ad136f88 ffffffff81b67001 ffffffff83cb0990 ffffffff83cb27f0 ffffffff83cb0990 ffffffff84252000 ffff8801d3ad0000 ffff8801ad136fe0 ffffffff81406d83 0000000000000007 ffff8801ad1370d0 ffff8801d3ad0900 Call Trace: [<0000000077cfb9f5>] __dump_stack lib/dump_stack.c:15 [inline] [<0000000077cfb9f5>] dump_stack+0xc1/0x120 lib/dump_stack.c:51 [<00000000a1f60adc>] print_circular_bug.cold+0x2f6/0x454 kernel/locking/lockdep.c:1202 [<000000002ad18abb>] check_prev_add kernel/locking/lockdep.c:1828 [inline] [<000000002ad18abb>] check_prevs_add kernel/locking/lockdep.c:1938 [inline] [<000000002ad18abb>] validate_chain kernel/locking/lockdep.c:2265 [inline] [<000000002ad18abb>] __lock_acquire+0x2d22/0x4390 kernel/locking/lockdep.c:3345 [<00000000d45d51f8>] lock_acquire+0x133/0x3d0 kernel/locking/lockdep.c:3756 [<0000000057cd429b>] __mutex_lock_common kernel/locking/mutex.c:521 [inline] [<0000000057cd429b>] mutex_lock_killable_nested+0xcd/0xa10 kernel/locking/mutex.c:641 [<000000008018428d>] lock_trace+0x44/0xc0 fs/proc/base.c:431 [<0000000040ad4042>] proc_pid_stack+0x12b/0x290 fs/proc/base.c:481 [<0000000027bfa600>] proc_single_show+0xf6/0x160 fs/proc/base.c:785 [<000000009cdde390>] seq_read+0x4cd/0x1250 fs/seq_file.c:240 [<000000003430e4e8>] do_loop_readv_writev.part.0+0xcc/0x2c0 fs/read_write.c:721 [<0000000048631103>] do_loop_readv_writev fs/read_write.c:710 [inline] [<0000000048631103>] do_readv_writev+0x556/0x7a0 fs/read_write.c:876 [<0000000069da1d2b>] vfs_readv+0x86/0xc0 fs/read_write.c:900 [<00000000fb83bb67>] kernel_readv fs/splice.c:363 [inline] [<00000000fb83bb67>] default_file_splice_read+0x44b/0x7e0 fs/splice.c:435 binder: 28144:28145 ioctl 4018620d 0 returned -22 [<00000000a134c93b>] do_splice_to+0x108/0x170 fs/splice.c:899 [<00000000593a5161>] splice_direct_to_actor+0x246/0x820 fs/splice.c:971 [<00000000dd697073>] do_splice_direct+0x1a5/0x260 fs/splice.c:1080 [<000000006188d182>] do_sendfile+0x503/0xc00 fs/read_write.c:1402 [<00000000bf7fcd8d>] SYSC_sendfile64 fs/read_write.c:1463 [inline] [<00000000bf7fcd8d>] SyS_sendfile64+0x145/0x160 fs/read_write.c:1449 [<00000000c4a3116b>] do_syscall_64+0x1ad/0x5c0 arch/x86/entry/common.c:288 [<00000000925954c0>] entry_SYSCALL_64_after_swapgs+0x5d/0xdb binder: 28169:28175 ioctl 4018620d 0 returned -22 binder: 28171:28176 ioctl 4018620d 0 returned -22 binder: 28169:28175 ioctl 4018620d 0 returned -22 binder: 28171:28176 ioctl 4018620d 0 returned -22 binder: 28261:28264 ioctl 4018620d 0 returned -22 binder: 28255:28258 ioctl 4018620d 0 returned -22 binder: 28255:28258 ioctl 4018620d 0 returned -22 binder: 28261:28264 ioctl 4018620d 0 returned -22 binder: 28328:28331 ioctl 4018620d 0 returned -22 binder: 28335:28340 ioctl 4018620d 0 returned -22 binder: 28328:28331 ioctl 4018620d 0 returned -22 binder: 28361:28362 ioctl 4018620d 0 returned -22 binder: 28335:28340 ioctl 4018620d 0 returned -22 binder: 28397:28398 ioctl 4018620d 0 returned -22 binder: 28414:28418 ioctl 4018620d 0 returned -22 binder: 28397:28398 ioctl 4018620d 0 returned -22 binder: 28414:28418 ioctl 4018620d 0 returned -22 binder: 28458:28461 ioctl 4018620d 0 returned -22 binder: 28463:28467 ioctl 4018620d 0 returned -22 binder: 28458:28461 ioctl 4018620d 0 returned -22 binder: 28463:28467 ioctl 4018620d 0 returned -22 binder: 28517:28520 ioctl 4018620d 0 returned -22 binder: 28522:28523 ioctl 4018620d 0 returned -22 binder: 28517:28520 ioctl 4018620d 0 returned -22 binder: 28522:28523 ioctl 4018620d 0 returned -22 binder: 28580:28582 ioctl 4018620d 0 returned -22 binder: 28578:28584 ioctl 4018620d 0 returned -22 binder: 28580:28582 ioctl 4018620d 0 returned -22 binder: 28578:28584 ioctl 4018620d 0 returned -22 binder: 28631:28634 ioctl 4018620d 0 returned -22 binder: 28658:28661 ioctl 4018620d 0 returned -22 binder: 28631:28634 ioctl 4018620d 0 returned -22 device lo entered promiscuous mode selinux_nlmsg_perm: 5 callbacks suppressed SELinux: unrecognized netlink message: protocol=0 nlmsg_type=0 sclass=netlink_route_socket pig=28667 comm=syz-executor.3 binder: 28681:28683 ioctl 4018620d 0 returned -22 device lo left promiscuous mode binder: 28658:28661 ioctl 4018620d 0 returned -22 device lo entered promiscuous mode SELinux: unrecognized netlink message: protocol=0 nlmsg_type=0 sclass=netlink_route_socket pig=28661 comm=syz-executor.3 binder: 28681:28683 ioctl 4018620d 0 returned -22 device lo left promiscuous mode binder: 28735:28739 ioctl 4018620d 0 returned -22 binder: 28729:28732 ioctl 4018620d 0 returned -22