====================================================== WARNING: possible circular locking dependency detected 6.2.0-syzkaller-02299-g4a7d37e824f5 #0 Not tainted ------------------------------------------------------ kworker/1:1H/52 is trying to acquire lock: ffff88807dcd40e0 (&type->s_umount_key#48){+.+.}-{3:3}, at: freeze_super+0x45/0x3c0 fs/super.c:1667 but task is already holding lock: ffffc90000bd7da8 ((work_completion)(&(&gl->gl_work)->work)){+.+.}-{0:0}, at: process_one_work+0x8a1/0x1750 kernel/workqueue.c:2365 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #2 ((work_completion)(&(&gl->gl_work)->work)){+.+.}-{0:0}: process_one_work+0x8fd/0x1750 kernel/workqueue.c:2366 worker_thread+0x669/0x1090 kernel/workqueue.c:2537 kthread+0x2e8/0x3a0 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308 -> #1 ((wq_completion)glock_workqueue){+.+.}-{0:0}: __flush_workqueue+0x118/0x13a0 kernel/workqueue.c:2910 gfs2_gl_hash_clear+0xb1/0x270 fs/gfs2/glock.c:2191 gfs2_put_super+0x497/0x670 fs/gfs2/super.c:627 generic_shutdown_super+0x158/0x410 fs/super.c:491 kill_block_super+0x9b/0xf0 fs/super.c:1398 gfs2_kill_sb+0x108/0x170 fs/gfs2/ops_fstype.c:1738 deactivate_locked_super+0x98/0x160 fs/super.c:331 deactivate_super+0xb1/0xd0 fs/super.c:362 cleanup_mnt+0x2ae/0x3d0 fs/namespace.c:1177 task_work_run+0x16f/0x270 kernel/task_work.c:179 resume_user_mode_work include/linux/resume_user_mode.h:49 [inline] exit_to_user_mode_loop kernel/entry/common.c:171 [inline] exit_to_user_mode_prepare+0x23c/0x250 kernel/entry/common.c:203 __syscall_exit_to_user_mode_work kernel/entry/common.c:285 [inline] syscall_exit_to_user_mode+0x1d/0x50 kernel/entry/common.c:296 do_syscall_64+0x46/0xb0 arch/x86/entry/common.c:86 entry_SYSCALL_64_after_hwframe+0x63/0xcd -> #0 (&type->s_umount_key#48){+.+.}-{3:3}: check_prev_add kernel/locking/lockdep.c:3098 [inline] check_prevs_add kernel/locking/lockdep.c:3217 [inline] validate_chain kernel/locking/lockdep.c:3832 [inline] __lock_acquire+0x2a43/0x56d0 kernel/locking/lockdep.c:5056 lock_acquire kernel/locking/lockdep.c:5669 [inline] lock_acquire+0x1e3/0x660 kernel/locking/lockdep.c:5634 down_write+0x92/0x200 kernel/locking/rwsem.c:1573 freeze_super+0x45/0x3c0 fs/super.c:1667 freeze_go_sync+0x1df/0x320 fs/gfs2/glops.c:577 do_xmote+0x2f5/0xc40 fs/gfs2/glock.c:708 run_queue+0x3cf/0x660 fs/gfs2/glock.c:846 glock_work_func+0xc2/0x3b0 fs/gfs2/glock.c:1056 process_one_work+0x9bf/0x1750 kernel/workqueue.c:2390 worker_thread+0x669/0x1090 kernel/workqueue.c:2537 kthread+0x2e8/0x3a0 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308 other info that might help us debug this: Chain exists of: &type->s_umount_key#48 --> (wq_completion)glock_workqueue --> (work_completion)(&(&gl->gl_work)->work) Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock((work_completion)(&(&gl->gl_work)->work)); lock((wq_completion)glock_workqueue); lock((work_completion)(&(&gl->gl_work)->work)); lock(&type->s_umount_key#48); *** DEADLOCK *** 2 locks held by kworker/1:1H/52: #0: ffff88801b8ac538 ((wq_completion)glock_workqueue){+.+.}-{0:0}, at: arch_atomic64_set arch/x86/include/asm/atomic64_64.h:34 [inline] #0: ffff88801b8ac538 ((wq_completion)glock_workqueue){+.+.}-{0:0}, at: arch_atomic_long_set include/linux/atomic/atomic-long.h:41 [inline] #0: ffff88801b8ac538 ((wq_completion)glock_workqueue){+.+.}-{0:0}, at: atomic_long_set include/linux/atomic/atomic-instrumented.h:1280 [inline] #0: ffff88801b8ac538 ((wq_completion)glock_workqueue){+.+.}-{0:0}, at: set_work_data kernel/workqueue.c:639 [inline] #0: ffff88801b8ac538 ((wq_completion)glock_workqueue){+.+.}-{0:0}, at: set_work_pool_and_clear_pending kernel/workqueue.c:666 [inline] #0: ffff88801b8ac538 ((wq_completion)glock_workqueue){+.+.}-{0:0}, at: process_one_work+0x86d/0x1750 kernel/workqueue.c:2361 #1: ffffc90000bd7da8 ((work_completion)(&(&gl->gl_work)->work)){+.+.}-{0:0}, at: process_one_work+0x8a1/0x1750 kernel/workqueue.c:2365 stack backtrace: CPU: 1 PID: 52 Comm: kworker/1:1H Not tainted 6.2.0-syzkaller-02299-g4a7d37e824f5 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/21/2023 Workqueue: glock_workqueue glock_work_func Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xd1/0x138 lib/dump_stack.c:106 check_noncircular+0x25f/0x2e0 kernel/locking/lockdep.c:2178 check_prev_add kernel/locking/lockdep.c:3098 [inline] check_prevs_add kernel/locking/lockdep.c:3217 [inline] validate_chain kernel/locking/lockdep.c:3832 [inline] __lock_acquire+0x2a43/0x56d0 kernel/locking/lockdep.c:5056 lock_acquire kernel/locking/lockdep.c:5669 [inline] lock_acquire+0x1e3/0x660 kernel/locking/lockdep.c:5634 down_write+0x92/0x200 kernel/locking/rwsem.c:1573 freeze_super+0x45/0x3c0 fs/super.c:1667 freeze_go_sync+0x1df/0x320 fs/gfs2/glops.c:577 do_xmote+0x2f5/0xc40 fs/gfs2/glock.c:708 run_queue+0x3cf/0x660 fs/gfs2/glock.c:846 glock_work_func+0xc2/0x3b0 fs/gfs2/glock.c:1056 process_one_work+0x9bf/0x1750 kernel/workqueue.c:2390 worker_thread+0x669/0x1090 kernel/workqueue.c:2537 kthread+0x2e8/0x3a0 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308