====================================================== WARNING: possible circular locking dependency detected 5.11.0-rc3-next-20210115-syzkaller #0 Not tainted ------------------------------------------------------ kworker/0:1H/2061 is trying to acquire lock: ffff888012f3e0e0 (&type->s_umount_key#58){+.+.}-{3:3}, at: freeze_super+0x41/0x330 fs/super.c:1663 but task is already holding lock: ffffc90007267da8 ((work_completion)(&(&gl->gl_work)->work)){+.+.}-{0:0}, at: process_one_work+0x8a5/0x15f0 kernel/workqueue.c:2250 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+0x8fc/0x15f0 kernel/workqueue.c:2251 worker_thread+0x64c/0x1120 kernel/workqueue.c:2421 kthread+0x3b1/0x4a0 kernel/kthread.c:292 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:296 -> #1 ((wq_completion)glock_workqueue){+.+.}-{0:0}: flush_workqueue+0x110/0x13e0 kernel/workqueue.c:2786 gfs2_gl_hash_clear+0xad/0x270 fs/gfs2/glock.c:1982 gfs2_put_super+0x44b/0x680 fs/gfs2/super.c:701 generic_shutdown_super+0x144/0x370 fs/super.c:464 kill_block_super+0x97/0xf0 fs/super.c:1393 gfs2_kill_sb+0x104/0x160 fs/gfs2/ops_fstype.c:1663 deactivate_locked_super+0x94/0x160 fs/super.c:335 deactivate_super+0xad/0xd0 fs/super.c:366 cleanup_mnt+0x3a3/0x530 fs/namespace.c:1110 task_work_run+0xdd/0x190 kernel/task_work.c:140 tracehook_notify_resume include/linux/tracehook.h:189 [inline] exit_to_user_mode_loop kernel/entry/common.c:177 [inline] exit_to_user_mode_prepare+0x249/0x250 kernel/entry/common.c:210 __syscall_exit_to_user_mode_work kernel/entry/common.c:301 [inline] syscall_exit_to_user_mode+0x19/0x50 kernel/entry/common.c:312 entry_SYSCALL_64_after_hwframe+0x44/0xa9 -> #0 (&type->s_umount_key#58){+.+.}-{3:3}: check_prev_add kernel/locking/lockdep.c:2868 [inline] check_prevs_add kernel/locking/lockdep.c:2993 [inline] validate_chain kernel/locking/lockdep.c:3608 [inline] __lock_acquire+0x2b26/0x54f0 kernel/locking/lockdep.c:4832 lock_acquire kernel/locking/lockdep.c:5442 [inline] lock_acquire+0x1a8/0x720 kernel/locking/lockdep.c:5407 down_write+0x8d/0x150 kernel/locking/rwsem.c:1406 freeze_super+0x41/0x330 fs/super.c:1663 freeze_go_sync+0x1e2/0x330 fs/gfs2/glops.c:588 do_xmote+0x2ff/0xbc0 fs/gfs2/glock.c:616 run_queue+0x323/0x680 fs/gfs2/glock.c:753 glock_work_func+0xff/0x3f0 fs/gfs2/glock.c:920 process_one_work+0x98d/0x15f0 kernel/workqueue.c:2275 worker_thread+0x64c/0x1120 kernel/workqueue.c:2421 kthread+0x3b1/0x4a0 kernel/kthread.c:292 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:296 other info that might help us debug this: Chain exists of: &type->s_umount_key#58 --> (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#58); *** DEADLOCK *** 2 locks held by kworker/0:1H/2061: #0: ffff888016fa9538 ((wq_completion)glock_workqueue){+.+.}-{0:0}, at: arch_atomic64_set arch/x86/include/asm/atomic64_64.h:34 [inline] #0: ffff888016fa9538 ((wq_completion)glock_workqueue){+.+.}-{0:0}, at: atomic64_set include/asm-generic/atomic-instrumented.h:856 [inline] #0: ffff888016fa9538 ((wq_completion)glock_workqueue){+.+.}-{0:0}, at: atomic_long_set include/asm-generic/atomic-long.h:41 [inline] #0: ffff888016fa9538 ((wq_completion)glock_workqueue){+.+.}-{0:0}, at: set_work_data kernel/workqueue.c:616 [inline] #0: ffff888016fa9538 ((wq_completion)glock_workqueue){+.+.}-{0:0}, at: set_work_pool_and_clear_pending kernel/workqueue.c:643 [inline] #0: ffff888016fa9538 ((wq_completion)glock_workqueue){+.+.}-{0:0}, at: process_one_work+0x871/0x15f0 kernel/workqueue.c:2246 #1: ffffc90007267da8 ((work_completion)(&(&gl->gl_work)->work)){+.+.}-{0:0}, at: process_one_work+0x8a5/0x15f0 kernel/workqueue.c:2250 stack backtrace: CPU: 0 PID: 2061 Comm: kworker/0:1H Not tainted 5.11.0-rc3-next-20210115-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Workqueue: glock_workqueue glock_work_func Call Trace: __dump_stack lib/dump_stack.c:79 [inline] dump_stack+0x107/0x163 lib/dump_stack.c:120 check_noncircular+0x25f/0x2e0 kernel/locking/lockdep.c:2117 check_prev_add kernel/locking/lockdep.c:2868 [inline] check_prevs_add kernel/locking/lockdep.c:2993 [inline] validate_chain kernel/locking/lockdep.c:3608 [inline] __lock_acquire+0x2b26/0x54f0 kernel/locking/lockdep.c:4832 lock_acquire kernel/locking/lockdep.c:5442 [inline] lock_acquire+0x1a8/0x720 kernel/locking/lockdep.c:5407 down_write+0x8d/0x150 kernel/locking/rwsem.c:1406 freeze_super+0x41/0x330 fs/super.c:1663 freeze_go_sync+0x1e2/0x330 fs/gfs2/glops.c:588 do_xmote+0x2ff/0xbc0 fs/gfs2/glock.c:616 run_queue+0x323/0x680 fs/gfs2/glock.c:753 glock_work_func+0xff/0x3f0 fs/gfs2/glock.c:920 process_one_work+0x98d/0x15f0 kernel/workqueue.c:2275 worker_thread+0x64c/0x1120 kernel/workqueue.c:2421 kthread+0x3b1/0x4a0 kernel/kthread.c:292 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:296