====================================================== [ INFO: possible circular locking dependency detected ] 4.4.154+ #32 Not tainted ------------------------------------------------------- syz-executor637/2264 is trying to acquire lock: (sel_mutex){+.+.+.}, at: [] sel_read_policy+0x59/0x110 security/selinux/selinuxfs.c:441 but task is already holding lock: (sb_writers#4){.+.+.+}, at: [] file_start_write include/linux/fs.h:2541 [inline] (sb_writers#4){.+.+.+}, at: [] do_sendfile+0x89a/0xb80 fs/read_write.c:1226 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+0x1ae/0x310 fs/super.c:1221 [] sb_start_write include/linux/fs.h:1515 [inline] [] ext4_run_li_request fs/ext4/super.c:2674 [inline] [] ext4_lazyinit_thread+0x1a7/0x750 fs/ext4/super.c:2773 [] kthread+0x268/0x300 kernel/kthread.c:211 [] ret_from_fork+0x55/0x80 arch/x86/entry/entry_64.S:510 [] lock_acquire+0x15e/0x450 kernel/locking/lockdep.c:3592 [] __mutex_lock_common kernel/locking/mutex.c:521 [inline] [] mutex_lock_nested+0xbb/0x840 kernel/locking/mutex.c:621 [] ext4_register_li_request+0x304/0x6c0 fs/ext4/super.c:2961 [] ext4_remount+0x1368/0x1bb0 fs/ext4/super.c:4909 [] do_remount_sb2+0x428/0x7d0 fs/super.c:771 [] do_remount fs/namespace.c:2335 [inline] [] do_mount+0x101e/0x28f0 fs/namespace.c:2848 [] SYSC_mount fs/namespace.c:3051 [inline] [] SyS_mount+0x191/0x1c0 fs/namespace.c:3029 [] 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+0xbb/0x840 kernel/locking/mutex.c:621 [] ext4_register_li_request+0x87/0x6c0 fs/ext4/super.c:2934 [] ext4_remount+0x1368/0x1bb0 fs/ext4/super.c:4909 [] do_remount_sb2+0x428/0x7d0 fs/super.c:771 [] do_remount fs/namespace.c:2335 [inline] [] do_mount+0x101e/0x28f0 fs/namespace.c:2848 [] SYSC_mount fs/namespace.c:3051 [inline] [] SyS_mount+0x191/0x1c0 fs/namespace.c:3029 [] 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/0x260 fs/super.c:537 [] selinux_complete_init+0x2f/0x31 security/selinux/hooks.c:6154 [] security_load_policy+0x886/0x9b0 security/selinux/ss/services.c:2060 [] sel_write_load+0x191/0xfc0 security/selinux/selinuxfs.c:535 [] __vfs_write+0x11c/0x3e0 fs/read_write.c:489 [] vfs_write+0x17e/0x4e0 fs/read_write.c:538 [] SYSC_write fs/read_write.c:585 [inline] [] SyS_write+0xd9/0x1c0 fs/read_write.c:577 [] 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+0x3b6e/0x5ba0 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+0xbb/0x840 kernel/locking/mutex.c:621 [] sel_read_policy+0x59/0x110 security/selinux/selinuxfs.c:441 [] do_loop_readv_writev+0x148/0x1e0 fs/read_write.c:680 [] do_readv_writev+0x581/0x6f0 fs/read_write.c:810 [] vfs_readv+0x78/0xb0 fs/read_write.c:834 [] kernel_readv fs/splice.c:586 [inline] [] default_file_splice_read+0x4fb/0x8d0 fs/splice.c:662 [] do_splice_to+0xf7/0x140 fs/splice.c:1154 [] splice_direct_to_actor+0x242/0x830 fs/splice.c:1226 [] do_splice_direct+0x1a3/0x270 fs/splice.c:1337 [] do_sendfile+0x4e4/0xb80 fs/read_write.c:1227 [] SYSC_sendfile64 fs/read_write.c:1282 [inline] [] SyS_sendfile64+0xc3/0x150 fs/read_write.c:1274 [] do_syscall_32_irqs_on arch/x86/entry/common.c:393 [inline] [] do_fast_syscall_32+0x31e/0x8b0 arch/x86/entry/common.c:460 [] sysenter_flags_fixed+0xd/0x1a 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(sel_mutex); *** DEADLOCK *** 1 lock held by syz-executor637/2264: #0: (sb_writers#4){.+.+.+}, at: [] file_start_write include/linux/fs.h:2541 [inline] #0: (sb_writers#4){.+.+.+}, at: [] do_sendfile+0x89a/0xb80 fs/read_write.c:1226 stack backtrace: CPU: 0 PID: 2264 Comm: syz-executor637 Not tainted 4.4.154+ #32 0000000000000000 6724c3dca7ea76cc ffff8801ca84f068 ffffffff81a54fed ffffffff83abea60 ffffffff83ab2190 ffffffff83aae830 ffff8801cb3da0a8 ffff8801cb3d97c0 ffff8801ca84f0b0 ffffffff81391d2f 0000000000000001 Call Trace: [] __dump_stack lib/dump_stack.c:15 [inline] [] dump_stack+0xc1/0x124 lib/dump_stack.c:51 [] print_circular_bug.cold.34+0x2f7/0x432 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+0x3b6e/0x5ba0 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+0xbb/0x840 kernel/locking/mutex.c:621 [] sel_read_policy+0x59/0x110 security/selinux/selinuxfs.c:441 [] do_loop_readv_writev+0x148/0x1e0 fs/read_write.c:680 [] do_readv_writev+0x581/0x6f0 fs/read_write.c:810 [] vfs_readv+0x78/0xb0 fs/read_write.c:834 [] kernel_readv fs/splice.c:586 [inline] [] default_file_splice_read+0x4fb/0x8d0 fs/splice.c:662 [] do_splice_to+0xf7/0x140 fs/splice.c:1154 [] splice_direct_to_actor+0x242/0x830 fs/splice.c:1226 [] do_splice_direct+0x1a3/0x270 fs/splice.c:1337 [] do_sendfile+0x4e4/0xb80 fs/read_write.c:1227 [] SYSC_sendfile64 fs/read_write.c:1282 [inline] [] SyS_sendfile64+0xc3/0x150 fs/read_write.c:1274 [] do_syscall_32_irqs_on arch/x86/entry/common.c:393 [inline] [] do_fast_syscall_32+0x31e/0x8b0 arch/x86/entry/common.c:460 [] sysenter_flags_fixed+0xd/0x1a