EXT4-fs (loop1): feature flags set on rev 0 fs, running e2fsck is recommended EXT4-fs (loop1): orphan cleanup on readonly fs ====================================================== WARNING: possible circular locking dependency detected 4.19.211-syzkaller #0 Not tainted ------------------------------------------------------ syz-executor.1/27584 is trying to acquire lock: 000000006444cb2f (&ei->i_data_sem/2){++++}, at: ext4_map_blocks+0x33e/0x1a50 fs/ext4/inode.c:578 but task is already holding lock: 00000000c604d4c3 (&s->s_dquot.dqio_sem){++++}, at: v2_write_dquot+0x8b/0x250 fs/quota/quota_v2.c:355 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #2 (&s->s_dquot.dqio_sem){++++}: v2_read_dquot+0x49/0x120 fs/quota/quota_v2.c:333 dquot_acquire+0x121/0x490 fs/quota/dquot.c:428 ext4_acquire_dquot+0x1e7/0x2d0 fs/ext4/super.c:5666 dqget+0x785/0xfc0 fs/quota/dquot.c:896 __dquot_initialize+0x3bd/0xb70 fs/quota/dquot.c:1470 ext4_create+0x84/0x5f0 fs/ext4/namei.c:2510 lookup_open+0x893/0x1a20 fs/namei.c:3235 do_last fs/namei.c:3327 [inline] path_openat+0x1094/0x2df0 fs/namei.c:3537 do_filp_open+0x18c/0x3f0 fs/namei.c:3567 do_sys_open+0x3b3/0x520 fs/open.c:1085 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe -> #1 (&dquot->dq_lock){+.+.}: dquot_commit+0x4d/0x400 fs/quota/dquot.c:469 ext4_write_dquot+0x1e7/0x280 fs/ext4/super.c:5650 ext4_mark_dquot_dirty+0x111/0x1a0 fs/ext4/super.c:5701 mark_dquot_dirty fs/quota/dquot.c:341 [inline] mark_all_dquot_dirty fs/quota/dquot.c:379 [inline] __dquot_alloc_space+0x37e/0x860 fs/quota/dquot.c:1702 dquot_alloc_space_nodirty include/linux/quotaops.h:298 [inline] dquot_alloc_space include/linux/quotaops.h:311 [inline] dquot_alloc_block include/linux/quotaops.h:335 [inline] ext4_mb_new_blocks+0x58c/0x4370 fs/ext4/mballoc.c:4534 ext4_ext_map_blocks+0x2aa2/0x7390 fs/ext4/extents.c:4493 ext4_map_blocks+0x7a2/0x1a50 fs/ext4/inode.c:657 _ext4_get_block+0x208/0x530 fs/ext4/inode.c:810 __block_write_begin_int+0x46c/0x17b0 fs/buffer.c:1978 ext4_write_begin+0x52d/0x1610 fs/ext4/inode.c:1345 ext4_da_write_begin+0x737/0x10e0 fs/ext4/inode.c:3051 generic_perform_write+0x1f8/0x4d0 mm/filemap.c:3170 __generic_file_write_iter+0x24b/0x610 mm/filemap.c:3295 ext4_file_write_iter+0x2fe/0xf20 fs/ext4/file.c:272 call_write_iter include/linux/fs.h:1821 [inline] new_sync_write fs/read_write.c:474 [inline] __vfs_write+0x51b/0x770 fs/read_write.c:487 vfs_write+0x1f3/0x540 fs/read_write.c:549 ksys_write+0x12b/0x2a0 fs/read_write.c:599 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe -> #0 (&ei->i_data_sem/2){++++}: down_read+0x36/0x80 kernel/locking/rwsem.c:24 ext4_map_blocks+0x33e/0x1a50 fs/ext4/inode.c:578 ext4_getblk+0xad/0x4f0 fs/ext4/inode.c:993 ext4_bread+0x7c/0x210 fs/ext4/inode.c:1043 ext4_quota_write+0x205/0x530 fs/ext4/super.c:6008 write_blk+0x10a/0x200 fs/quota/quota_tree.c:72 do_insert_tree+0xc0e/0x1150 fs/quota/quota_tree.c:344 do_insert_tree+0x85b/0x1150 fs/quota/quota_tree.c:339 do_insert_tree+0x85b/0x1150 fs/quota/quota_tree.c:339 dq_insert_tree fs/quota/quota_tree.c:365 [inline] qtree_write_dquot+0x1cb/0x570 fs/quota/quota_tree.c:384 v2_write_dquot+0x11c/0x250 fs/quota/quota_v2.c:359 dquot_acquire+0x25c/0x490 fs/quota/dquot.c:436 ext4_acquire_dquot+0x1e7/0x2d0 fs/ext4/super.c:5666 dqget+0x785/0xfc0 fs/quota/dquot.c:896 __dquot_initialize+0x3bd/0xb70 fs/quota/dquot.c:1470 ext4_orphan_cleanup fs/ext4/super.c:2681 [inline] ext4_fill_super+0x8202/0xc850 fs/ext4/super.c:4549 mount_bdev+0x2fc/0x3b0 fs/super.c:1158 mount_fs+0xa3/0x310 fs/super.c:1261 vfs_kern_mount.part.0+0x68/0x470 fs/namespace.c:961 vfs_kern_mount fs/namespace.c:951 [inline] do_new_mount fs/namespace.c:2492 [inline] do_mount+0x115c/0x2f50 fs/namespace.c:2822 ksys_mount+0xcf/0x130 fs/namespace.c:3038 __do_sys_mount fs/namespace.c:3052 [inline] __se_sys_mount fs/namespace.c:3049 [inline] __x64_sys_mount+0xba/0x150 fs/namespace.c:3049 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe other info that might help us debug this: Chain exists of: &ei->i_data_sem/2 --> &dquot->dq_lock --> &s->s_dquot.dqio_sem Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&s->s_dquot.dqio_sem); lock(&dquot->dq_lock); lock(&s->s_dquot.dqio_sem); lock(&ei->i_data_sem/2); *** DEADLOCK *** 3 locks held by syz-executor.1/27584: #0: 00000000af06debf (&type->s_umount_key#25/1){+.+.}, at: alloc_super fs/super.c:226 [inline] #0: 00000000af06debf (&type->s_umount_key#25/1){+.+.}, at: sget_userns+0x20b/0xcd0 fs/super.c:519 #1: 00000000e45d3a51 (&dquot->dq_lock){+.+.}, at: dquot_acquire+0x54/0x490 fs/quota/dquot.c:426 #2: 00000000c604d4c3 (&s->s_dquot.dqio_sem){++++}, at: v2_write_dquot+0x8b/0x250 fs/quota/quota_v2.c:355 stack backtrace: CPU: 0 PID: 27584 Comm: syz-executor.1 Not tainted 4.19.211-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x1fc/0x2ef lib/dump_stack.c:118 print_circular_bug.constprop.0.cold+0x2d7/0x41e kernel/locking/lockdep.c:1222 check_prev_add kernel/locking/lockdep.c:1866 [inline] check_prevs_add kernel/locking/lockdep.c:1979 [inline] validate_chain kernel/locking/lockdep.c:2420 [inline] __lock_acquire+0x30c9/0x3ff0 kernel/locking/lockdep.c:3416 lock_acquire+0x170/0x3c0 kernel/locking/lockdep.c:3908 down_read+0x36/0x80 kernel/locking/rwsem.c:24 ext4_map_blocks+0x33e/0x1a50 fs/ext4/inode.c:578 ext4_getblk+0xad/0x4f0 fs/ext4/inode.c:993 ext4_bread+0x7c/0x210 fs/ext4/inode.c:1043 ext4_quota_write+0x205/0x530 fs/ext4/super.c:6008 write_blk+0x10a/0x200 fs/quota/quota_tree.c:72 do_insert_tree+0xc0e/0x1150 fs/quota/quota_tree.c:344 do_insert_tree+0x85b/0x1150 fs/quota/quota_tree.c:339 do_insert_tree+0x85b/0x1150 fs/quota/quota_tree.c:339 dq_insert_tree fs/quota/quota_tree.c:365 [inline] qtree_write_dquot+0x1cb/0x570 fs/quota/quota_tree.c:384 v2_write_dquot+0x11c/0x250 fs/quota/quota_v2.c:359 dquot_acquire+0x25c/0x490 fs/quota/dquot.c:436 ext4_acquire_dquot+0x1e7/0x2d0 fs/ext4/super.c:5666 dqget+0x785/0xfc0 fs/quota/dquot.c:896 __dquot_initialize+0x3bd/0xb70 fs/quota/dquot.c:1470 ext4_orphan_cleanup fs/ext4/super.c:2681 [inline] ext4_fill_super+0x8202/0xc850 fs/ext4/super.c:4549 mount_bdev+0x2fc/0x3b0 fs/super.c:1158 mount_fs+0xa3/0x310 fs/super.c:1261 vfs_kern_mount.part.0+0x68/0x470 fs/namespace.c:961 vfs_kern_mount fs/namespace.c:951 [inline] do_new_mount fs/namespace.c:2492 [inline] do_mount+0x115c/0x2f50 fs/namespace.c:2822 ksys_mount+0xcf/0x130 fs/namespace.c:3038 __do_sys_mount fs/namespace.c:3052 [inline] __se_sys_mount fs/namespace.c:3049 [inline] __x64_sys_mount+0xba/0x150 fs/namespace.c:3049 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x7f798ecf55da Code: 48 c7 c2 b8 ff ff ff f7 d8 64 89 02 b8 ff ff ff ff eb d2 e8 b8 04 00 00 0f 1f 84 00 00 00 00 00 49 89 ca b8 a5 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f798d223f88 EFLAGS: 00000202 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 00000000000004da RCX: 00007f798ecf55da RDX: 0000000020000100 RSI: 0000000020000080 RDI: 00007f798d223fe0 RBP: 00007f798d224020 R08: 00007f798d224020 R09: 0000000001810005 R10: 0000000001810005 R11: 0000000000000202 R12: 0000000020000100 R13: 0000000020000080 R14: 00007f798d223fe0 R15: 0000000020000000 sched: RT throttling activated EXT4-fs error (device loop1): ext4_mb_generate_buddy:744: group 0, block bitmap and bg descriptor inconsistent: 69 vs 41 free clusters Quota error (device loop1): write_blk: dquota write failed Quota error (device loop1): qtree_write_dquot: Error -28 occurred while creating quota EXT4-fs warning (device loop1): ext4_update_dynamic_rev:860: updating to rev 1 because of new feature flag, running e2fsck is recommended Quota error (device loop1): free_dqentry: Quota structure has offset to other block (3653245223) than it should (5) Quota error (device loop1): write_blk: dquota write failed EXT4-fs (loop1): 1 orphan inode deleted EXT4-fs (loop1): mounted filesystem without journal. Opts: nodelalloc,nogrpid,,errors=continue vlan0: mtu less than device minimum netlink: 16 bytes leftover after parsing attributes in process `syz-executor.3'. netlink: 16 bytes leftover after parsing attributes in process `syz-executor.4'. netlink: 44 bytes leftover after parsing attributes in process `syz-executor.2'. IPVS: ftp: loaded support on port[0] = 21