EXT4-fs (loop6): mounted filesystem without journal. Opts: ,errors=continue ext4 filesystem being mounted at /syzkaller-testdir255384172/syzkaller.bAtvq4/445/file0 supports timestamps until 2038 (0x7fffffff) ====================================================== WARNING: possible circular locking dependency detected 5.10.56 #1 Not tainted ------------------------------------------------------ syz-executor.6/23209 is trying to acquire lock: ffff88804b2333b0 (&ei->i_data_sem/2){++++}-{3:3}, at: ext4_map_blocks+0x380/0x18d0 fs/ext4/inode.c:560 but task is already holding lock: ffff8880667961e0 (&s->s_dquot.dqio_sem){++++}-{3:3}, at: v2_write_dquot+0x8b/0x250 fs/quota/quota_v2.c:354 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #2 (&s->s_dquot.dqio_sem){++++}-{3:3}: down_read+0x9b/0x420 kernel/locking/rwsem.c:1504 v2_read_dquot+0x49/0x120 fs/quota/quota_v2.c:332 dquot_acquire+0x133/0x570 fs/quota/dquot.c:434 ext4_acquire_dquot+0x245/0x350 fs/ext4/super.c:6200 dqget+0x61e/0xf00 fs/quota/dquot.c:901 __dquot_initialize+0x3c3/0xb80 fs/quota/dquot.c:1479 dquot_initialize fs/quota/dquot.c:1537 [inline] dquot_file_open fs/quota/dquot.c:2161 [inline] dquot_file_open+0x92/0xb0 fs/quota/dquot.c:2155 ext4_file_open fs/ext4/file.c:869 [inline] ext4_file_open+0x2a2/0xa10 fs/ext4/file.c:839 do_dentry_open+0x4b7/0x1090 fs/open.c:817 do_open fs/namei.c:3243 [inline] path_openat+0x1939/0x26c0 fs/namei.c:3360 do_filp_open+0x17e/0x3c0 fs/namei.c:3387 do_sys_openat2+0x16d/0x420 fs/open.c:1180 do_sys_open fs/open.c:1196 [inline] __do_sys_creat fs/open.c:1270 [inline] __se_sys_creat fs/open.c:1264 [inline] __x64_sys_creat+0xc9/0x120 fs/open.c:1264 do_syscall_64+0x33/0x40 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 -> #1 (&dquot->dq_lock){+.+.}-{3:3}: __mutex_lock_common kernel/locking/mutex.c:969 [inline] __mutex_lock+0x13f/0x1230 kernel/locking/mutex.c:1114 dquot_commit+0x4d/0x380 fs/quota/dquot.c:476 ext4_write_dquot+0x243/0x2f0 fs/ext4/super.c:6184 ext4_mark_dquot_dirty+0x111/0x1a0 fs/ext4/super.c:6235 mark_dquot_dirty fs/quota/dquot.c:347 [inline] mark_all_dquot_dirty fs/quota/dquot.c:385 [inline] __dquot_alloc_space+0x5d5/0xb50 fs/quota/dquot.c:1709 dquot_alloc_space_nodirty include/linux/quotaops.h:297 [inline] dquot_alloc_space include/linux/quotaops.h:310 [inline] dquot_alloc_block include/linux/quotaops.h:334 [inline] ext4_mb_new_blocks+0x5c7/0x46d0 fs/ext4/mballoc.c:4968 ext4_alloc_branch fs/ext4/indirect.c:333 [inline] ext4_ind_map_blocks+0x18fa/0x2260 fs/ext4/indirect.c:626 ext4_map_blocks+0x9c7/0x18d0 fs/ext4/inode.c:639 ext4_getblk+0x144/0x680 fs/ext4/inode.c:847 ext4_bread+0x29/0x210 fs/ext4/inode.c:899 ext4_add_entry+0xa2e/0xc30 fs/ext4/namei.c:2242 ext4_add_nondir+0x90/0x290 fs/ext4/namei.c:2584 ext4_create+0x374/0x4d0 fs/ext4/namei.c:2629 lookup_open.isra.0+0xe6b/0x1230 fs/namei.c:3099 open_last_lookups fs/namei.c:3169 [inline] path_openat+0x961/0x26c0 fs/namei.c:3357 do_filp_open+0x17e/0x3c0 fs/namei.c:3387 do_sys_openat2+0x16d/0x420 fs/open.c:1180 do_sys_open fs/open.c:1196 [inline] __do_sys_creat fs/open.c:1270 [inline] __se_sys_creat fs/open.c:1264 [inline] __x64_sys_creat+0xc9/0x120 fs/open.c:1264 do_syscall_64+0x33/0x40 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 -> #0 (&ei->i_data_sem/2){++++}-{3:3}: check_prev_add kernel/locking/lockdep.c:2985 [inline] check_prevs_add kernel/locking/lockdep.c:3110 [inline] validate_chain kernel/locking/lockdep.c:3725 [inline] __lock_acquire+0x29f6/0x5b20 kernel/locking/lockdep.c:4950 lock_acquire kernel/locking/lockdep.c:5560 [inline] lock_acquire+0x197/0x490 kernel/locking/lockdep.c:5525 down_read+0x9b/0x420 kernel/locking/rwsem.c:1504 ext4_map_blocks+0x380/0x18d0 fs/ext4/inode.c:560 ext4_getblk+0x144/0x680 fs/ext4/inode.c:847 ext4_bread+0x29/0x210 fs/ext4/inode.c:899 ext4_quota_write+0x233/0x630 fs/ext4/super.c:6544 write_blk+0x10c/0x200 fs/quota/quota_tree.c:73 get_free_dqblk+0xff/0x2d0 fs/quota/quota_tree.c:102 do_insert_tree+0x79c/0x1150 fs/quota/quota_tree.c:309 do_insert_tree+0xf5c/0x1150 fs/quota/quota_tree.c:340 dq_insert_tree fs/quota/quota_tree.c:366 [inline] qtree_write_dquot+0x3bf/0x580 fs/quota/quota_tree.c:385 v2_write_dquot+0x11c/0x250 fs/quota/quota_v2.c:358 dquot_acquire+0x2cf/0x570 fs/quota/dquot.c:443 ext4_acquire_dquot+0x245/0x350 fs/ext4/super.c:6200 dqget+0x61e/0xf00 fs/quota/dquot.c:901 __dquot_initialize+0x3c3/0xb80 fs/quota/dquot.c:1479 dquot_initialize fs/quota/dquot.c:1537 [inline] dquot_file_open fs/quota/dquot.c:2161 [inline] dquot_file_open+0x92/0xb0 fs/quota/dquot.c:2155 ext4_file_open fs/ext4/file.c:869 [inline] ext4_file_open+0x2a2/0xa10 fs/ext4/file.c:839 do_dentry_open+0x4b7/0x1090 fs/open.c:817 do_open fs/namei.c:3243 [inline] path_openat+0x1939/0x26c0 fs/namei.c:3360 do_filp_open+0x17e/0x3c0 fs/namei.c:3387 do_sys_openat2+0x16d/0x420 fs/open.c:1180 do_sys_open fs/open.c:1196 [inline] __do_sys_creat fs/open.c:1270 [inline] __se_sys_creat fs/open.c:1264 [inline] __x64_sys_creat+0xc9/0x120 fs/open.c:1264 do_syscall_64+0x33/0x40 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 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.6/23209: #0: ffff888066796438 (sb_writers#3){.+.+}-{0:0}, at: do_open fs/namei.c:3236 [inline] #0: ffff888066796438 (sb_writers#3){.+.+}-{0:0}, at: path_openat+0x1a3d/0x26c0 fs/namei.c:3360 #1: ffff88804beb7768 (&dquot->dq_lock){+.+.}-{3:3}, at: dquot_acquire+0x54/0x570 fs/quota/dquot.c:432 #2: ffff8880667961e0 (&s->s_dquot.dqio_sem){++++}-{3:3}, at: v2_write_dquot+0x8b/0x250 fs/quota/quota_v2.c:354 stack backtrace: CPU: 1 PID: 23209 Comm: syz-executor.6 Not tainted 5.10.56 #1 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.14.0-0-g155821a1990b-prebuilt.qemu.org 04/01/2014 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x107/0x163 lib/dump_stack.c:118 check_noncircular+0x25f/0x2e0 kernel/locking/lockdep.c:2120 check_prev_add kernel/locking/lockdep.c:2985 [inline] check_prevs_add kernel/locking/lockdep.c:3110 [inline] validate_chain kernel/locking/lockdep.c:3725 [inline] __lock_acquire+0x29f6/0x5b20 kernel/locking/lockdep.c:4950 lock_acquire kernel/locking/lockdep.c:5560 [inline] lock_acquire+0x197/0x490 kernel/locking/lockdep.c:5525 down_read+0x9b/0x420 kernel/locking/rwsem.c:1504 ext4_map_blocks+0x380/0x18d0 fs/ext4/inode.c:560 ext4_getblk+0x144/0x680 fs/ext4/inode.c:847 ext4_bread+0x29/0x210 fs/ext4/inode.c:899 ext4_quota_write+0x233/0x630 fs/ext4/super.c:6544 write_blk+0x10c/0x200 fs/quota/quota_tree.c:73 get_free_dqblk+0xff/0x2d0 fs/quota/quota_tree.c:102 do_insert_tree+0x79c/0x1150 fs/quota/quota_tree.c:309 do_insert_tree+0xf5c/0x1150 fs/quota/quota_tree.c:340 dq_insert_tree fs/quota/quota_tree.c:366 [inline] qtree_write_dquot+0x3bf/0x580 fs/quota/quota_tree.c:385 v2_write_dquot+0x11c/0x250 fs/quota/quota_v2.c:358 dquot_acquire+0x2cf/0x570 fs/quota/dquot.c:443 ext4_acquire_dquot+0x245/0x350 fs/ext4/super.c:6200 dqget+0x61e/0xf00 fs/quota/dquot.c:901 __dquot_initialize+0x3c3/0xb80 fs/quota/dquot.c:1479 dquot_initialize fs/quota/dquot.c:1537 [inline] dquot_file_open fs/quota/dquot.c:2161 [inline] dquot_file_open+0x92/0xb0 fs/quota/dquot.c:2155 ext4_file_open fs/ext4/file.c:869 [inline] ext4_file_open+0x2a2/0xa10 fs/ext4/file.c:839 do_dentry_open+0x4b7/0x1090 fs/open.c:817 do_open fs/namei.c:3243 [inline] path_openat+0x1939/0x26c0 fs/namei.c:3360 do_filp_open+0x17e/0x3c0 fs/namei.c:3387 do_sys_openat2+0x16d/0x420 fs/open.c:1180 do_sys_open fs/open.c:1196 [inline] __do_sys_creat fs/open.c:1270 [inline] __se_sys_creat fs/open.c:1264 [inline] __x64_sys_creat+0xc9/0x120 fs/open.c:1264 do_syscall_64+0x33/0x40 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x466609 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 bc ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fa3b02ee188 EFLAGS: 00000246 ORIG_RAX: 0000000000000055 RAX: ffffffffffffffda RBX: 000000000056bf80 RCX: 0000000000466609 RDX: 0000000000000000 RSI: 0000000000000003 RDI: 00000000200000c0 RBP: 00000000004bfcb9 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000056bf80 R13: 00007ffe8c24eecf R14: 00007fa3b02ee300 R15: 0000000000022000 EXT4-fs (loop3): mounted filesystem without journal. Opts: ,errors=continue ext4 filesystem being mounted at /syzkaller-testdir694371986/syzkaller.WPMO3F/39/file0 supports timestamps until 2038 (0x7fffffff) EXT4-fs warning (device loop7): read_mmp_block:106: Error -117 while reading MMP block 17 EXT4-fs error (device loop3): ext4_validate_block_bitmap:398: comm syz-executor.3: bg 0: block 2: invalid block bitmap EXT4-fs error (device loop3): ext4_xattr_block_set:2156: inode #12: comm syz-executor.3: bad block 0 EXT4-fs (loop6): mounted filesystem without journal. Opts: ,errors=continue ext4 filesystem being mounted at /syzkaller-testdir255384172/syzkaller.bAtvq4/446/file0 supports timestamps until 2038 (0x7fffffff) kauditd_printk_skb: 2 callbacks suppressed audit: type=1326 audit(1628382854.888:229): auid=0 uid=0 gid=0 ses=4 subj=system_u:system_r:kernel_t:s0 pid=23262 comm="syz-executor.4" exe="/syz-executor.4" sig=0 arch=c000003e syscall=202 compat=0 ip=0x466609 code=0x7ffc0000 audit: type=1326 audit(1628382854.898:230): auid=0 uid=0 gid=0 ses=4 subj=system_u:system_r:kernel_t:s0 pid=23262 comm="syz-executor.4" exe="/syz-executor.4" sig=0 arch=c000003e syscall=68 compat=0 ip=0x466609 code=0x7ffc0000 audit: type=1326 audit(1628382854.905:231): auid=0 uid=0 gid=0 ses=4 subj=system_u:system_r:kernel_t:s0 pid=23262 comm="syz-executor.4" exe="/syz-executor.4" sig=0 arch=c000003e syscall=202 compat=0 ip=0x466609 code=0x7ffc0000 audit: type=1326 audit(1628382854.911:232): auid=0 uid=0 gid=0 ses=4 subj=system_u:system_r:kernel_t:s0 pid=23262 comm="syz-executor.4" exe="/syz-executor.4" sig=0 arch=c000003e syscall=68 compat=0 ip=0x466609 code=0x7ffc0000 audit: type=1326 audit(1628382854.911:233): auid=0 uid=0 gid=0 ses=4 subj=system_u:system_r:kernel_t:s0 pid=23262 comm="syz-executor.4" exe="/syz-executor.4" sig=0 arch=c000003e syscall=202 compat=0 ip=0x466609 code=0x7ffc0000 audit: type=1326 audit(1628382854.911:234): auid=0 uid=0 gid=0 ses=4 subj=system_u:system_r:kernel_t:s0 pid=23262 comm="syz-executor.4" exe="/syz-executor.4" sig=0 arch=c000003e syscall=69 compat=0 ip=0x466609 code=0x7ffc0000 audit: type=1326 audit(1628382854.911:235): auid=0 uid=0 gid=0 ses=4 subj=system_u:system_r:kernel_t:s0 pid=23262 comm="syz-executor.4" exe="/syz-executor.4" sig=0 arch=c000003e syscall=202 compat=0 ip=0x466609 code=0x7ffc0000 audit: type=1326 audit(1628382854.913:236): auid=0 uid=0 gid=0 ses=4 subj=system_u:system_r:kernel_t:s0 pid=23262 comm="syz-executor.4" exe="/syz-executor.4" sig=0 arch=c000003e syscall=70 compat=0 ip=0x466609 code=0x7ffc0000 EXT4-fs warning (device loop7): read_mmp_block:106: Error -117 while reading MMP block 17 EXT4-fs (loop6): mounted filesystem without journal. Opts: ,errors=continue ext4 filesystem being mounted at /syzkaller-testdir255384172/syzkaller.bAtvq4/447/file0 supports timestamps until 2038 (0x7fffffff) audit: type=1326 audit(1628382855.700:237): auid=0 uid=0 gid=0 ses=4 subj=system_u:system_r:kernel_t:s0 pid=23262 comm="syz-executor.4" exe="/syz-executor.4" sig=0 arch=c000003e syscall=202 compat=0 ip=0x466609 code=0x7ffc0000 audit: type=1326 audit(1628382855.701:238): auid=0 uid=0 gid=0 ses=4 subj=system_u:system_r:kernel_t:s0 pid=23262 comm="syz-executor.4" exe="/syz-executor.4" sig=0 arch=c000003e syscall=202 compat=0 ip=0x466609 code=0x7ffc0000