====================================================== WARNING: possible circular locking dependency detected 6.4.0-rc1-syzkaller-00177-gbb7c241fae62 #0 Not tainted ------------------------------------------------------ kworker/1:1H/51 is trying to acquire lock: ffff888088d560e0 (&type->s_umount_key#73){++++}-{3:3}, at: freeze_super+0x45/0x450 fs/super.c:1676 but task is already holding lock: ffffc90000dcfdb0 ((work_completion)(&(&gl->gl_work)->work)){+.+.}-{0:0}, at: process_one_work+0x8b7/0x15e0 kernel/workqueue.c:2380 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+0x90e/0x15e0 kernel/workqueue.c:2381 worker_thread+0x67d/0x10c0 kernel/workqueue.c:2552 kthread+0x344/0x440 kernel/kthread.c:379 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:2925 gfs2_gl_hash_clear+0xb1/0x270 fs/gfs2/glock.c:2195 gfs2_put_super+0x497/0x670 fs/gfs2/super.c:642 generic_shutdown_super+0x158/0x480 fs/super.c:500 kill_block_super+0xa1/0x100 fs/super.c:1407 gfs2_kill_sb+0x378/0x430 fs/gfs2/ops_fstype.c:1804 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+0x210/0x240 kernel/entry/common.c:204 __syscall_exit_to_user_mode_work kernel/entry/common.c:286 [inline] syscall_exit_to_user_mode+0x1d/0x50 kernel/entry/common.c:297 do_syscall_64+0x46/0xb0 arch/x86/entry/common.c:86 entry_SYSCALL_64_after_hwframe+0x63/0xcd -> #0 (&type->s_umount_key#73){++++}-{3:3}: check_prev_add kernel/locking/lockdep.c:3108 [inline] check_prevs_add kernel/locking/lockdep.c:3227 [inline] validate_chain kernel/locking/lockdep.c:3842 [inline] __lock_acquire+0x2f21/0x5df0 kernel/locking/lockdep.c:5074 lock_acquire kernel/locking/lockdep.c:5691 [inline] lock_acquire+0x1b1/0x520 kernel/locking/lockdep.c:5656 down_write+0x92/0x200 kernel/locking/rwsem.c:1573 freeze_super+0x45/0x450 fs/super.c:1676 freeze_go_sync+0x1df/0x470 fs/gfs2/glops.c:587 do_xmote+0x2f5/0xd70 fs/gfs2/glock.c:706 run_queue+0x3cf/0x660 fs/gfs2/glock.c:844 glock_work_func+0xc2/0x3b0 fs/gfs2/glock.c:1076 process_one_work+0x99a/0x15e0 kernel/workqueue.c:2405 worker_thread+0x67d/0x10c0 kernel/workqueue.c:2552 kthread+0x344/0x440 kernel/kthread.c:379 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#73 --> (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#73); *** DEADLOCK *** 2 locks held by kworker/1:1H/51: #0: ffff888014b53538 ((wq_completion)glock_workqueue){+.+.}-{0:0}, at: arch_atomic64_set arch/x86/include/asm/atomic64_64.h:34 [inline] #0: ffff888014b53538 ((wq_completion)glock_workqueue){+.+.}-{0:0}, at: arch_atomic_long_set include/linux/atomic/atomic-long.h:41 [inline] #0: ffff888014b53538 ((wq_completion)glock_workqueue){+.+.}-{0:0}, at: atomic_long_set include/linux/atomic/atomic-instrumented.h:1324 [inline] #0: ffff888014b53538 ((wq_completion)glock_workqueue){+.+.}-{0:0}, at: set_work_data kernel/workqueue.c:643 [inline] #0: ffff888014b53538 ((wq_completion)glock_workqueue){+.+.}-{0:0}, at: set_work_pool_and_clear_pending kernel/workqueue.c:670 [inline] #0: ffff888014b53538 ((wq_completion)glock_workqueue){+.+.}-{0:0}, at: process_one_work+0x883/0x15e0 kernel/workqueue.c:2376 #1: ffffc90000dcfdb0 ((work_completion)(&(&gl->gl_work)->work)){+.+.}-{0:0}, at: process_one_work+0x8b7/0x15e0 kernel/workqueue.c:2380 stack backtrace: CPU: 1 PID: 51 Comm: kworker/1:1H Not tainted 6.4.0-rc1-syzkaller-00177-gbb7c241fae62 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/28/2023 Workqueue: glock_workqueue glock_work_func Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xd9/0x150 lib/dump_stack.c:106 check_noncircular+0x25f/0x2e0 kernel/locking/lockdep.c:2188 check_prev_add kernel/locking/lockdep.c:3108 [inline] check_prevs_add kernel/locking/lockdep.c:3227 [inline] validate_chain kernel/locking/lockdep.c:3842 [inline] __lock_acquire+0x2f21/0x5df0 kernel/locking/lockdep.c:5074 lock_acquire kernel/locking/lockdep.c:5691 [inline] lock_acquire+0x1b1/0x520 kernel/locking/lockdep.c:5656 down_write+0x92/0x200 kernel/locking/rwsem.c:1573 freeze_super+0x45/0x450 fs/super.c:1676 freeze_go_sync+0x1df/0x470 fs/gfs2/glops.c:587 do_xmote+0x2f5/0xd70 fs/gfs2/glock.c:706 run_queue+0x3cf/0x660 fs/gfs2/glock.c:844 glock_work_func+0xc2/0x3b0 fs/gfs2/glock.c:1076 process_one_work+0x99a/0x15e0 kernel/workqueue.c:2405 worker_thread+0x67d/0x10c0 kernel/workqueue.c:2552 kthread+0x344/0x440 kernel/kthread.c:379 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308