====================================================== [ INFO: possible circular locking dependency detected ] 4.4.174+ #4 Not tainted ------------------------------------------------------- syz-executor.1/17425 is trying to acquire lock: (&p->lock){+.+.+.}, at: [] seq_read+0xd6/0x1240 fs/seq_file.c:178 but task is already holding lock: (sb_writers#4){.+.+.+}, at: [] file_start_write include/linux/fs.h:2543 [inline] (sb_writers#4){.+.+.+}, at: [] do_sendfile+0x8a6/0xba0 fs/read_write.c:1228 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 [] percpu_down_read include/linux/percpu-rwsem.h:26 [inline] [] __sb_start_write+0x1af/0x310 fs/super.c:1239 [] sb_start_write include/linux/fs.h:1517 [inline] [] ext4_run_li_request fs/ext4/super.c:2685 [inline] [] ext4_lazyinit_thread fs/ext4/super.c:2784 [inline] [] ext4_lazyinit_thread+0x1e4/0x7b0 fs/ext4/super.c:2760 [] kthread+0x273/0x310 kernel/kthread.c:211 [] ret_from_fork+0x55/0x80 arch/x86/entry/entry_64.S:537 [] 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 [] ext4_register_li_request+0x2fd/0x7d0 fs/ext4/super.c:2972 [] ext4_remount+0x1366/0x1b90 fs/ext4/super.c:4922 [] do_remount_sb2+0x41b/0x7a0 fs/super.c:781 [] do_remount fs/namespace.c:2347 [inline] [] do_mount+0xfdb/0x2a40 fs/namespace.c:2860 [] SYSC_mount fs/namespace.c:3063 [inline] [] SyS_mount+0x130/0x1d0 fs/namespace.c:3041 [] entry_SYSCALL_64_fastpath+0x1e/0x9a [] 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 [] ext4_register_li_request+0x89/0x7d0 fs/ext4/super.c:2945 [] ext4_remount+0x1366/0x1b90 fs/ext4/super.c:4922 [] do_remount_sb2+0x41b/0x7a0 fs/super.c:781 [] do_remount fs/namespace.c:2347 [inline] [] do_mount+0xfdb/0x2a40 fs/namespace.c:2860 [] SYSC_mount fs/namespace.c:3063 [inline] [] SyS_mount+0x130/0x1d0 fs/namespace.c:3041 [] entry_SYSCALL_64_fastpath+0x1e/0x9a [] lock_acquire+0x15e/0x450 kernel/locking/lockdep.c:3592 [] down_read+0x42/0x60 kernel/locking/rwsem.c:22 [] iterate_supers+0xe1/0x250 fs/super.c:547 [] selinux_complete_init+0x2f/0x31 security/selinux/hooks.c:6154 [] security_load_policy+0x69d/0x9c0 security/selinux/ss/services.c:2060 [] sel_write_load+0x175/0xf90 security/selinux/selinuxfs.c:535 [] __vfs_write+0x116/0x3d0 fs/read_write.c:491 [] vfs_write+0x182/0x4e0 fs/read_write.c:540 [] SYSC_write fs/read_write.c:587 [inline] [] SyS_write+0xdc/0x1c0 fs/read_write.c:579 [] entry_SYSCALL_64_fastpath+0x1e/0x9a [] 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 [] sel_commit_bools_write+0x89/0x260 security/selinux/selinuxfs.c:1142 [] __vfs_write+0x116/0x3d0 fs/read_write.c:491 [] __kernel_write+0x112/0x370 fs/read_write.c:513 [] write_pipe_buf+0x15d/0x1f0 fs/splice.c:1074 [] splice_from_pipe_feed fs/splice.c:776 [inline] [] __splice_from_pipe+0x37e/0x7a0 fs/splice.c:901 [] splice_from_pipe+0x108/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+0xd71/0x13a0 fs/splice.c:1690 [] entry_SYSCALL_64_fastpath+0x1e/0x9a [] 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 [] __pipe_lock fs/pipe.c:86 [inline] [] fifo_open+0x15d/0xa00 fs/pipe.c:896 [] do_dentry_open+0x38f/0xbd0 fs/open.c:749 [] vfs_open+0x10b/0x210 fs/open.c:862 [] do_last fs/namei.c:3269 [inline] [] path_openat+0x136f/0x4470 fs/namei.c:3406 [] do_filp_open+0x1a1/0x270 fs/namei.c:3440 [] do_open_execat+0x10c/0x6e0 fs/exec.c:805 [] do_execveat_common.isra.0+0x6f6/0x1e90 fs/exec.c:1577 [] do_execve fs/exec.c:1683 [inline] [] SYSC_execve fs/exec.c:1764 [inline] [] SyS_execve+0x42/0x50 fs/exec.c:1759 [] return_from_execve+0x0/0x23 [] 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 [] lock_trace+0x44/0xc0 fs/proc/base.c:448 [] proc_pid_syscall+0x9b/0x250 fs/proc/base.c:683 [] proc_single_show+0xf6/0x160 fs/proc/base.c:805 [] seq_read+0x4cd/0x1240 fs/seq_file.c:240 [] __vfs_read+0x116/0x3c0 fs/read_write.c:434 [] vfs_read+0x134/0x360 fs/read_write.c:456 [] SYSC_read fs/read_write.c:571 [inline] [] SyS_read+0xdc/0x1c0 fs/read_write.c:564 [] entry_SYSCALL_64_fastpath+0x1e/0x9a [] 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_nested+0xc1/0xb80 kernel/locking/mutex.c:621 [] seq_read+0xd6/0x1240 fs/seq_file.c:178 [] proc_reg_read+0xfd/0x180 fs/proc/inode.c:202 [] 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 [] SYSC_sendfile64 fs/read_write.c:1290 [inline] [] SyS_sendfile64+0x137/0x150 fs/read_write.c:1276 [] entry_SYSCALL_64_fastpath+0x1e/0x9a other info that might help us debug this: Chain exists of: Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(sb_writers#4); lock(&eli->li_list_mtx); lock(sb_writers#4); lock(&p->lock); *** DEADLOCK *** 1 lock held by syz-executor.1/17425: #0: (sb_writers#4){.+.+.+}, at: [] file_start_write include/linux/fs.h:2543 [inline] #0: (sb_writers#4){.+.+.+}, at: [] do_sendfile+0x8a6/0xba0 fs/read_write.c:1228 stack backtrace: CPU: 1 PID: 17425 Comm: syz-executor.1 Not tainted 4.4.174+ #4 0000000000000000 1b26e27992eff925 ffff880064756f40 ffffffff81aad1a1 ffffffff84057a80 ffff880195682f80 ffffffff83ab81b0 ffffffff83abc380 ffffffff83ac8080 ffff880064756f90 ffffffff813abcda ffffffff83e1f800 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_nested+0xc1/0xb80 kernel/locking/mutex.c:621 [] seq_read+0xd6/0x1240 fs/seq_file.c:178 [] proc_reg_read+0xfd/0x180 fs/proc/inode.c:202 [] 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 [] SYSC_sendfile64 fs/read_write.c:1290 [inline] [] SyS_sendfile64+0x137/0x150 fs/read_write.c:1276 [] entry_SYSCALL_64_fastpath+0x1e/0x9a audit: type=1400 audit(1574836242.894:5181): avc: denied { create } for pid=17422 comm="syz-executor.1" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=netlink_generic_socket permissive=0 audit: type=1400 audit(1574836243.744:5182): avc: denied { create } for pid=17473 comm="syz-executor.0" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=netlink_generic_socket permissive=0 audit: type=1400 audit(1574836243.804:5183): avc: denied { create } for pid=17473 comm="syz-executor.0" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=netlink_generic_socket permissive=0 SELinux: unrecognized netlink message: protocol=0 nlmsg_type=65535 sclass=netlink_route_socket audit: type=1400 audit(1574836243.924:5184): avc: denied { create } for pid=17473 comm="syz-executor.0" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=netlink_generic_socket permissive=0 audit: type=1400 audit(1574836243.984:5185): avc: denied { create } for pid=17473 comm="syz-executor.0" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=netlink_generic_socket permissive=0 audit: type=1400 audit(1574836244.324:5186): avc: denied { create } for pid=17487 comm="syz-executor.0" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=netlink_generic_socket permissive=0 audit: type=1400 audit(1574836244.324:5187): avc: denied { create } for pid=17489 comm="syz-executor.4" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=netlink_generic_socket permissive=0 audit: type=1400 audit(1574836244.424:5188): avc: denied { create } for pid=17489 comm="syz-executor.4" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=netlink_generic_socket permissive=0 audit: type=1400 audit(1574836244.464:5189): avc: denied { create } for pid=17487 comm="syz-executor.0" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=netlink_generic_socket permissive=0 SELinux: unrecognized netlink message: protocol=0 nlmsg_type=65535 sclass=netlink_route_socket SELinux: unrecognized netlink message: protocol=0 nlmsg_type=65535 sclass=netlink_route_socket audit: type=1400 audit(1574836245.064:5190): avc: denied { create } for pid=17522 comm="syz-executor.4" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=netlink_generic_socket permissive=0 audit: type=1400 audit(1574836245.124:5192): avc: denied { create } for pid=17522 comm="syz-executor.4" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=netlink_generic_socket permissive=0 SELinux: unrecognized netlink message: protocol=0 nlmsg_type=65535 sclass=netlink_route_socket SELinux: unrecognized netlink message: protocol=0 nlmsg_type=65535 sclass=netlink_route_socket SELinux: unrecognized netlink message: protocol=0 nlmsg_type=65535 sclass=netlink_route_socket SELinux: unrecognized netlink message: protocol=0 nlmsg_type=65535 sclass=netlink_route_socket SELinux: unrecognized netlink message: protocol=0 nlmsg_type=65535 sclass=netlink_route_socket SELinux: unrecognized netlink message: protocol=4 nlmsg_type=0 sclass=netlink_tcpdiag_socket SELinux: unrecognized netlink message: protocol=4 nlmsg_type=0 sclass=netlink_tcpdiag_socket SELinux: unrecognized netlink message: protocol=0 nlmsg_type=65535 sclass=netlink_route_socket SELinux: unrecognized netlink message: protocol=0 nlmsg_type=65535 sclass=netlink_route_socket SELinux: unrecognized netlink message: protocol=0 nlmsg_type=65535 sclass=netlink_route_socket SELinux: unrecognized netlink message: protocol=0 nlmsg_type=65535 sclass=netlink_route_socket SELinux: unrecognized netlink message: protocol=0 nlmsg_type=65535 sclass=netlink_route_socket SELinux: unrecognized netlink message: protocol=0 nlmsg_type=65535 sclass=netlink_route_socket SELinux: unrecognized netlink message: protocol=0 nlmsg_type=65535 sclass=netlink_route_socket SELinux: unrecognized netlink message: protocol=0 nlmsg_type=65535 sclass=netlink_route_socket SELinux: unrecognized netlink message: protocol=0 nlmsg_type=65535 sclass=netlink_route_socket SELinux: unrecognized netlink message: protocol=0 nlmsg_type=65535 sclass=netlink_route_socket SELinux: unrecognized netlink message: protocol=0 nlmsg_type=65535 sclass=netlink_route_socket SELinux: unrecognized netlink message: protocol=0 nlmsg_type=65535 sclass=netlink_route_socket SELinux: unrecognized netlink message: protocol=0 nlmsg_type=65535 sclass=netlink_route_socket audit_printk_skb: 132 callbacks suppressed audit: type=1400 audit(1574836248.904:5236): avc: denied { create } for pid=17684 comm="syz-executor.4" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=netlink_generic_socket permissive=0 audit: type=1400 audit(1574836249.054:5237): avc: denied { create } for pid=17689 comm="syz-executor.0" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=netlink_generic_socket permissive=0 audit: type=1400 audit(1574836249.104:5238): avc: denied { create } for pid=17689 comm="syz-executor.0" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=netlink_generic_socket permissive=0 SELinux: unrecognized netlink message: protocol=0 nlmsg_type=65535 sclass=netlink_route_socket audit: type=1400 audit(1574836249.214:5239): avc: denied { create } for pid=17658 comm="syz-executor.5" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=netlink_generic_socket permissive=0 audit: type=1400 audit(1574836249.294:5240): avc: denied { create } for pid=17658 comm="syz-executor.5" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=netlink_generic_socket permissive=0 SELinux: unrecognized netlink message: protocol=0 nlmsg_type=65535 sclass=netlink_route_socket audit: type=1400 audit(1574836249.364:5241): avc: denied { create } for pid=17697 comm="syz-executor.2" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=netlink_generic_socket permissive=0 audit: type=1400 audit(1574836249.404:5242): avc: denied { create } for pid=17697 comm="syz-executor.2" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=netlink_generic_socket permissive=0 SELinux: unrecognized netlink message: protocol=0 nlmsg_type=65535 sclass=netlink_route_socket audit: type=1400 audit(1574836249.504:5243): avc: denied { create } for pid=17701 comm="syz-executor.0" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=netlink_generic_socket permissive=0 audit: type=1400 audit(1574836249.534:5244): avc: denied { create } for pid=17702 comm="syz-executor.4" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=netlink_generic_socket permissive=0 audit: type=1400 audit(1574836249.584:5245): avc: denied { create } for pid=17701 comm="syz-executor.0" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=netlink_generic_socket permissive=0 SELinux: unrecognized netlink message: protocol=0 nlmsg_type=65535 sclass=netlink_route_socket SELinux: unrecognized netlink message: protocol=0 nlmsg_type=65535 sclass=netlink_route_socket SELinux: unrecognized netlink message: protocol=0 nlmsg_type=65535 sclass=netlink_route_socket SELinux: unrecognized netlink message: protocol=0 nlmsg_type=65535 sclass=netlink_route_socket SELinux: unrecognized netlink message: protocol=0 nlmsg_type=65535 sclass=netlink_route_socket SELinux: unrecognized netlink message: protocol=0 nlmsg_type=65535 sclass=netlink_route_socket SELinux: unrecognized netlink message: protocol=0 nlmsg_type=65535 sclass=netlink_route_socket SELinux: unrecognized netlink message: protocol=0 nlmsg_type=65535 sclass=netlink_route_socket