====================================================== WARNING: possible circular locking dependency detected 5.15.186-syzkaller #0 Not tainted ------------------------------------------------------ syz.5.91/5008 is trying to acquire lock: ffffffff8c23f840 ((quota_release_work).work){+.+.}-{0:0}, at: __flush_work+0xc1/0x1b0 kernel/workqueue.c:3090 but task is already holding lock: ffff8880618de558 (sb_pagefaults){++++}-{0:0}, at: sb_wait_write fs/super.c:1626 [inline] ffff8880618de558 (sb_pagefaults){++++}-{0:0}, at: freeze_super+0x15b/0x420 fs/super.c:1722 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #4 (sb_pagefaults){++++}-{0:0}: percpu_down_read+0x46/0x1b0 include/linux/percpu-rwsem.h:51 __sb_start_write include/linux/fs.h:1811 [inline] sb_start_pagefault include/linux/fs.h:1910 [inline] ext4_page_mkwrite+0x19d/0x1240 fs/ext4/inode.c:6157 do_page_mkwrite+0x168/0x3c0 mm/memory.c:2922 wp_page_shared+0x16b/0x6d0 mm/memory.c:3259 handle_pte_fault mm/memory.c:4668 [inline] __handle_mm_fault mm/memory.c:4785 [inline] handle_mm_fault+0x1eca/0x43c0 mm/memory.c:4883 do_user_addr_fault+0x489/0xc80 arch/x86/mm/fault.c:1357 handle_page_fault arch/x86/mm/fault.c:1445 [inline] exc_page_fault+0x60/0x100 arch/x86/mm/fault.c:1501 asm_exc_page_fault+0x22/0x30 arch/x86/include/asm/idtentry.h:606 -> #3 (&mm->mmap_lock){++++}-{3:3}: __might_fault+0xb3/0x110 mm/memory.c:5357 _copy_to_user+0x29/0x130 lib/usercopy.c:35 copy_to_user include/linux/uaccess.h:200 [inline] fiemap_fill_next_extent+0x19d/0x360 fs/ioctl.c:144 ocfs2_fiemap+0x857/0xc40 fs/ocfs2/extent_map.c:796 ioctl_fiemap fs/ioctl.c:219 [inline] do_vfs_ioctl+0x1464/0x1de0 fs/ioctl.c:814 __do_sys_ioctl fs/ioctl.c:872 [inline] __se_sys_ioctl+0x83/0x170 fs/ioctl.c:860 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 -> #2 (&ocfs2_quota_ip_alloc_sem_key){++++}-{3:3}: down_write+0x38/0x60 kernel/locking/rwsem.c:1551 ocfs2_create_local_dquot+0x194/0x1750 fs/ocfs2/quota_local.c:1224 ocfs2_acquire_dquot+0x7cb/0xaf0 fs/ocfs2/quota_global.c:871 dqget+0x778/0xeb0 fs/quota/dquot.c:988 __dquot_initialize+0x3b6/0xcb0 fs/quota/dquot.c:1517 ocfs2_get_init_inode+0x138/0x1b0 fs/ocfs2/namei.c:202 ocfs2_mknod+0x8aa/0x22b0 fs/ocfs2/namei.c:310 ocfs2_mkdir+0x192/0x410 fs/ocfs2/namei.c:657 vfs_mkdir+0x387/0x570 fs/namei.c:4065 do_mkdirat+0x1d7/0x5a0 fs/namei.c:4090 __do_sys_mkdirat fs/namei.c:4105 [inline] __se_sys_mkdirat fs/namei.c:4103 [inline] __x64_sys_mkdirat+0x85/0x90 fs/namei.c:4103 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 -> #1 (&dquot->dq_lock){+.+.}-{3:3}: __mutex_lock_common+0x1eb/0x2390 kernel/locking/mutex.c:596 __mutex_lock kernel/locking/mutex.c:729 [inline] mutex_lock_nested+0x17/0x20 kernel/locking/mutex.c:743 ocfs2_release_dquot+0x23d/0xb90 fs/ocfs2/quota_global.c:729 quota_release_workfn+0x356/0x600 fs/quota/dquot.c:848 process_one_work+0x863/0x1000 kernel/workqueue.c:2310 worker_thread+0xaa8/0x12a0 kernel/workqueue.c:2457 kthread+0x436/0x520 kernel/kthread.c:334 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287 -> #0 ((quota_release_work).work){+.+.}-{0:0}: check_prev_add kernel/locking/lockdep.c:3053 [inline] check_prevs_add kernel/locking/lockdep.c:3172 [inline] validate_chain kernel/locking/lockdep.c:3788 [inline] __lock_acquire+0x2c33/0x7c60 kernel/locking/lockdep.c:5012 lock_acquire+0x197/0x3f0 kernel/locking/lockdep.c:5623 __flush_work+0xdd/0x1b0 kernel/workqueue.c:3090 flush_work kernel/workqueue.c:3115 [inline] flush_delayed_work+0x121/0x170 kernel/workqueue.c:3239 dquot_writeback_dquots+0xef/0x940 fs/quota/dquot.c:693 ext4_sync_fs+0x1c5/0x650 fs/ext4/super.c:5644 sync_filesystem+0xe6/0x220 fs/sync.c:56 freeze_super+0x163/0x420 fs/super.c:1725 freeze_bdev+0xec/0x210 block/bdev.c:251 ext4_shutdown fs/ext4/ioctl.c:581 [inline] __ext4_ioctl fs/ext4/ioctl.c:1254 [inline] ext4_ioctl+0x2af8/0x3590 fs/ext4/ioctl.c:1282 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:874 [inline] __se_sys_ioctl+0xfa/0x170 fs/ioctl.c:860 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 other info that might help us debug this: Chain exists of: (quota_release_work).work --> &mm->mmap_lock --> sb_pagefaults Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(sb_pagefaults); lock(&mm->mmap_lock); lock(sb_pagefaults); lock((quota_release_work).work); *** DEADLOCK *** 4 locks held by syz.5.91/5008: #0: ffff88801cdd1208 (&bdev->bd_fsfreeze_mutex){+.+.}-{3:3}, at: freeze_bdev+0x2d/0x210 block/bdev.c:241 #1: ffff8880618de460 (sb_writers#5){++++}-{0:0}, at: sb_wait_write fs/super.c:1626 [inline] #1: ffff8880618de460 (sb_writers#5){++++}-{0:0}, at: freeze_super+0x12d/0x420 fs/super.c:1717 #2: ffff8880618de0e0 (&type->s_umount_key#32){++++}-{3:3}, at: freeze_super+0x135/0x420 fs/super.c:1718 #3: ffff8880618de558 (sb_pagefaults){++++}-{0:0}, at: sb_wait_write fs/super.c:1626 [inline] #3: ffff8880618de558 (sb_pagefaults){++++}-{0:0}, at: freeze_super+0x15b/0x420 fs/super.c:1722 stack backtrace: CPU: 0 PID: 5008 Comm: syz.5.91 Not tainted 5.15.186-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025 Call Trace: dump_stack_lvl+0x168/0x230 lib/dump_stack.c:106 check_noncircular+0x274/0x310 kernel/locking/lockdep.c:2133 check_prev_add kernel/locking/lockdep.c:3053 [inline] check_prevs_add kernel/locking/lockdep.c:3172 [inline] validate_chain kernel/locking/lockdep.c:3788 [inline] __lock_acquire+0x2c33/0x7c60 kernel/locking/lockdep.c:5012 lock_acquire+0x197/0x3f0 kernel/locking/lockdep.c:5623 __flush_work+0xdd/0x1b0 kernel/workqueue.c:3090 flush_work kernel/workqueue.c:3115 [inline] flush_delayed_work+0x121/0x170 kernel/workqueue.c:3239 dquot_writeback_dquots+0xef/0x940 fs/quota/dquot.c:693 ext4_sync_fs+0x1c5/0x650 fs/ext4/super.c:5644 sync_filesystem+0xe6/0x220 fs/sync.c:56 freeze_super+0x163/0x420 fs/super.c:1725 freeze_bdev+0xec/0x210 block/bdev.c:251 ext4_shutdown fs/ext4/ioctl.c:581 [inline] __ext4_ioctl fs/ext4/ioctl.c:1254 [inline] ext4_ioctl+0x2af8/0x3590 fs/ext4/ioctl.c:1282 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:874 [inline] __se_sys_ioctl+0xfa/0x170 fs/ioctl.c:860 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 RIP: 0033:0x7fe89bee8929 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 a8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fe899d50038 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007fe89c10ffa0 RCX: 00007fe89bee8929 RDX: 0000200000000080 RSI: 000000008004587d RDI: 0000000000000005 RBP: 00007fe89bf6ab39 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007fe89c10ffa0 R15: 00007fff2c184878