====================================================== WARNING: possible circular locking dependency detected 5.17.0-syzkaller #0 Not tainted ------------------------------------------------------ syz-executor234/4062 is trying to acquire lock: ffff88800fc64d38 ((wq_completion)events){+.+.}-{0:0}, at: flush_workqueue+0xca/0x1230 kernel/workqueue.c:2806 but task is already holding lock: ffff888022e3a0e0 (&type->s_umount_key#32){++++}-{3:3}, at: deactivate_super+0x5f/0x80 fs/super.c:362 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #3 (&type->s_umount_key#32){++++}-{3:3}: down_read+0x98/0x440 kernel/locking/rwsem.c:1461 iterate_supers+0xc2/0x200 fs/super.c:692 drop_caches_sysctl_handler+0x55/0x80 fs/drop_caches.c:62 proc_sys_call_handler+0x3c9/0x580 fs/proc/proc_sysctl.c:604 call_write_iter include/linux/fs.h:2080 [inline] do_iter_readv_writev+0x2b4/0x5b0 fs/read_write.c:726 do_iter_write+0x124/0x620 fs/read_write.c:852 iter_file_splice_write+0x598/0xaf0 fs/splice.c:689 do_splice_from fs/splice.c:767 [inline] direct_splice_actor+0xfb/0x1c0 fs/splice.c:936 splice_direct_to_actor+0x2dd/0x7c0 fs/splice.c:891 do_splice_direct+0x148/0x250 fs/splice.c:979 do_sendfile+0x90c/0x1100 fs/read_write.c:1246 __do_sys_sendfile64 fs/read_write.c:1305 [inline] __se_sys_sendfile64 fs/read_write.c:1297 [inline] __x64_sys_sendfile64+0x11a/0x1d0 fs/read_write.c:1297 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0x80 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x44/0xae -> #2 (sb_writers#3){.+.+}-{0:0}: percpu_down_read include/linux/percpu-rwsem.h:51 [inline] __sb_start_write include/linux/fs.h:1728 [inline] sb_start_write include/linux/fs.h:1798 [inline] file_start_write include/linux/fs.h:2815 [inline] kernel_write fs/read_write.c:564 [inline] kernel_write+0x231/0x420 fs/read_write.c:555 p9_fd_write net/9p/trans_fd.c:428 [inline] p9_write_work+0x1ef/0xaf0 net/9p/trans_fd.c:479 process_one_work+0x865/0x13d0 kernel/workqueue.c:2289 worker_thread+0x598/0xec0 kernel/workqueue.c:2436 kthread+0x299/0x340 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:298 -> #1 ((work_completion)(&m->wq)){+.+.}-{0:0}: process_one_work+0x800/0x13d0 kernel/workqueue.c:2265 worker_thread+0x598/0xec0 kernel/workqueue.c:2436 kthread+0x299/0x340 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:298 -> #0 ((wq_completion)events){+.+.}-{0:0}: check_prev_add kernel/locking/lockdep.c:3065 [inline] check_prevs_add kernel/locking/lockdep.c:3188 [inline] validate_chain kernel/locking/lockdep.c:3803 [inline] __lock_acquire+0x2a44/0x5660 kernel/locking/lockdep.c:5029 lock_acquire kernel/locking/lockdep.c:5641 [inline] lock_acquire+0x1ab/0x510 kernel/locking/lockdep.c:5606 flush_workqueue+0xed/0x1230 kernel/workqueue.c:2809 flush_scheduled_work include/linux/workqueue.h:592 [inline] ext4_put_super+0x91/0xec0 fs/ext4/super.c:1202 generic_shutdown_super+0x12e/0x3a0 fs/super.c:462 kill_block_super+0x90/0xd0 fs/super.c:1394 deactivate_locked_super+0x7b/0x130 fs/super.c:332 cleanup_mnt+0x324/0x4d0 fs/namespace.c:1186 task_work_run+0xc0/0x160 kernel/task_work.c:164 resume_user_mode_work include/linux/resume_user_mode.h:49 [inline] exit_to_user_mode_loop kernel/entry/common.c:183 [inline] exit_to_user_mode_prepare+0x23c/0x250 kernel/entry/common.c:215 __syscall_exit_to_user_mode_work kernel/entry/common.c:297 [inline] syscall_exit_to_user_mode+0x19/0x60 kernel/entry/common.c:308 do_syscall_64+0x42/0x80 arch/x86/entry/common.c:86 entry_SYSCALL_64_after_hwframe+0x44/0xae other info that might help us debug this: Chain exists of: (wq_completion)events --> sb_writers#3 --> &type->s_umount_key#32 Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&type->s_umount_key#32); lock(sb_writers#3); lock(&type->s_umount_key#32); lock((wq_completion)events); *** DEADLOCK *** 1 lock held by syz-executor234/4062: #0: ffff888022e3a0e0 (&type->s_umount_key#32){++++}-{3:3}, at: deactivate_super+0x5f/0x80 fs/super.c:362 stack backtrace: CPU: 0 PID: 4062 Comm: syz-executor234 Not tainted 5.17.0-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x57/0x7d lib/dump_stack.c:106 check_noncircular+0x25f/0x2e0 kernel/locking/lockdep.c:2145 check_prev_add kernel/locking/lockdep.c:3065 [inline] check_prevs_add kernel/locking/lockdep.c:3188 [inline] validate_chain kernel/locking/lockdep.c:3803 [inline] __lock_acquire+0x2a44/0x5660 kernel/locking/lockdep.c:5029 lock_acquire kernel/locking/lockdep.c:5641 [inline] lock_acquire+0x1ab/0x510 kernel/locking/lockdep.c:5606 flush_workqueue+0xed/0x1230 kernel/workqueue.c:2809 flush_scheduled_work include/linux/workqueue.h:592 [inline] ext4_put_super+0x91/0xec0 fs/ext4/super.c:1202 generic_shutdown_super+0x12e/0x3a0 fs/super.c:462 kill_block_super+0x90/0xd0 fs/super.c:1394 deactivate_locked_super+0x7b/0x130 fs/super.c:332 cleanup_mnt+0x324/0x4d0 fs/namespace.c:1186 task_work_run+0xc0/0x160 kernel/task_work.c:164 resume_user_mode_work include/linux/resume_user_mode.h:49 [inline] exit_to_user_mode_loop kernel/entry/common.c:183 [inline] exit_to_user_mode_prepare+0x23c/0x250 kernel/entry/common.c:215 __syscall_exit_to_user_mode_work kernel/entry/common.c:297 [inline] syscall_exit_to_user_mode+0x19/0x60 kernel/entry/common.c:308 do_syscall_64+0x42/0x80 arch/x86/entry/common.c:86 entry_SYSCALL_64_after_hwframe+0x44/0xae RIP: 0033:0x7f14ab202677 Code: 07 00 48 83 c4 08 5b 5d c3 66 2e 0f 1f 84 00 00 00 00 00 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 b8 a6 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 c0 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007ffe9b654638 EFLAGS: 00000202 ORIG_RAX: 00000000000000a6 RAX: 0000000000000000 RBX: 0000000000000000 RCX: 00007f14ab202677 RDX: 00007ffe9b6546f9 RSI: 000000000000000a RDI: 00007ffe9b6546f0 RBP: 00007ffe9b6546f0 R08: 00000000ffffffff R09: 00007ffe9b6544d0 R10: 0000555556925653 R11: 0000000000000202 R12: 00007ffe9b655760 R13: 00005555569255f0 R14: 00007ffe9b654660 R15: 0000000000000001