EXT4-fs (loop7): mounted filesystem without journal. Opts: ,errors=continue ext4 filesystem being mounted at /syzkaller-testdir120470177/syzkaller.GbtxHZ/421/file0 supports timestamps until 2038 (0x7fffffff) ====================================================== WARNING: possible circular locking dependency detected 5.10.56 #1 Not tainted ------------------------------------------------------ syz-executor.7/15974 is trying to acquire lock: ffff88805b65d138 (&ei->i_data_sem/2){++++}-{3:3}, at: ext4_map_blocks+0x380/0x18d0 fs/ext4/inode.c:560 but task is already holding lock: ffff8880588601e0 (&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 ext4_setattr+0x3ae/0x2220 fs/ext4/inode.c:5349 notify_change+0xb9e/0x1080 fs/attr.c:336 do_truncate+0x134/0x1f0 fs/open.c:64 handle_truncate fs/namei.c:2905 [inline] do_open fs/namei.c:3247 [inline] path_openat+0x1d4d/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_openat fs/open.c:1212 [inline] __se_sys_openat fs/open.c:1207 [inline] __x64_sys_openat+0x13f/0x1f0 fs/open.c:1207 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_free_space+0x739/0xa60 fs/quota/dquot.c:1894 dquot_free_space_nodirty include/linux/quotaops.h:376 [inline] dquot_free_space include/linux/quotaops.h:381 [inline] dquot_free_block include/linux/quotaops.h:392 [inline] ext4_free_blocks+0x1a76/0x20e0 fs/ext4/mballoc.c:5503 ext4_remove_blocks fs/ext4/extents.c:2501 [inline] ext4_ext_rm_leaf fs/ext4/extents.c:2667 [inline] ext4_ext_remove_space+0x2077/0x40d0 fs/ext4/extents.c:2915 ext4_ext_truncate+0x1e6/0x240 fs/ext4/extents.c:4376 ext4_truncate+0xd5a/0x12b0 fs/ext4/inode.c:4263 ext4_setattr+0x1487/0x2220 fs/ext4/inode.c:5504 notify_change+0xb9e/0x1080 fs/attr.c:336 do_truncate+0x134/0x1f0 fs/open.c:64 handle_truncate fs/namei.c:2905 [inline] do_open fs/namei.c:3247 [inline] path_openat+0x1d4d/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_openat fs/open.c:1212 [inline] __se_sys_openat fs/open.c:1207 [inline] __x64_sys_openat+0x13f/0x1f0 fs/open.c:1207 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 do_insert_tree+0x85b/0x1150 fs/quota/quota_tree.c:340 do_insert_tree+0x85b/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 ext4_setattr+0x3ae/0x2220 fs/ext4/inode.c:5349 notify_change+0xb9e/0x1080 fs/attr.c:336 do_truncate+0x134/0x1f0 fs/open.c:64 handle_truncate fs/namei.c:2905 [inline] do_open fs/namei.c:3247 [inline] path_openat+0x1d4d/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_openat fs/open.c:1212 [inline] __se_sys_openat fs/open.c:1207 [inline] __x64_sys_openat+0x13f/0x1f0 fs/open.c:1207 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 *** 4 locks held by syz-executor.7/15974: #0: ffff888058860438 (sb_writers#3){.+.+}-{0:0}, at: do_open fs/namei.c:3236 [inline] #0: ffff888058860438 (sb_writers#3){.+.+}-{0:0}, at: path_openat+0x1a3d/0x26c0 fs/namei.c:3360 #1: ffff88805b65bf98 (&sb->s_type->i_mutex_key#13){++++}-{3:3}, at: inode_lock include/linux/fs.h:774 [inline] #1: ffff88805b65bf98 (&sb->s_type->i_mutex_key#13){++++}-{3:3}, at: do_truncate+0x125/0x1f0 fs/open.c:62 #2: ffff888047da7ae8 (&dquot->dq_lock){+.+.}-{3:3}, at: dquot_acquire+0x54/0x570 fs/quota/dquot.c:432 #3: ffff8880588601e0 (&s->s_dquot.dqio_sem){++++}-{3:3}, at: v2_write_dquot+0x8b/0x250 fs/quota/quota_v2.c:354 stack backtrace: CPU: 1 PID: 15974 Comm: syz-executor.7 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 do_insert_tree+0x85b/0x1150 fs/quota/quota_tree.c:340 do_insert_tree+0x85b/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 ext4_setattr+0x3ae/0x2220 fs/ext4/inode.c:5349 notify_change+0xb9e/0x1080 fs/attr.c:336 do_truncate+0x134/0x1f0 fs/open.c:64 handle_truncate fs/namei.c:2905 [inline] do_open fs/namei.c:3247 [inline] path_openat+0x1d4d/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_openat fs/open.c:1212 [inline] __se_sys_openat fs/open.c:1207 [inline] __x64_sys_openat+0x13f/0x1f0 fs/open.c:1207 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:00007fb818322188 EFLAGS: 00000246 ORIG_RAX: 0000000000000101 RAX: ffffffffffffffda RBX: 000000000056bf80 RCX: 0000000000466609 RDX: 0000000000000200 RSI: 0000000020000040 RDI: 0000000000000005 RBP: 00000000004bfcb9 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000001 R11: 0000000000000246 R12: 000000000056bf80 R13: 00007ffcb5a2488f R14: 00007fb818322300 R15: 0000000000022000 Process accounting resumed Process accounting resumed FAULT_INJECTION: forcing a failure. name failslab, interval 1, probability 0, space 0, times 0 CPU: 0 PID: 15990 Comm: syz-executor.1 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 fail_dump lib/fault-inject.c:52 [inline] should_fail.cold+0x5/0xa lib/fault-inject.c:146 should_failslab+0x5/0x10 mm/slab_common.c:1193 slab_pre_alloc_hook mm/slab.h:515 [inline] slab_alloc_node mm/slub.c:2814 [inline] __kmalloc_node+0x76/0x4a0 mm/slub.c:4006 kmalloc_node include/linux/slab.h:575 [inline] __vmalloc_area_node mm/vmalloc.c:2478 [inline] __vmalloc_node_range+0x79e/0x9e0 mm/vmalloc.c:2560 __vmalloc_node+0xb5/0x100 mm/vmalloc.c:2603 netlink_alloc_large_skb net/netlink/af_netlink.c:1183 [inline] netlink_sendmsg+0x5f0/0xd90 net/netlink/af_netlink.c:1896 sock_sendmsg_nosec net/socket.c:651 [inline] sock_sendmsg+0x150/0x190 net/socket.c:671 sock_no_sendpage+0x12c/0x1a0 net/core/sock.c:2835 kernel_sendpage.part.0+0x146/0x290 net/socket.c:3633 kernel_sendpage net/socket.c:3630 [inline] sock_sendpage+0xe5/0x140 net/socket.c:944 pipe_to_sendpage+0x2af/0x380 fs/splice.c:364 splice_from_pipe_feed fs/splice.c:418 [inline] __splice_from_pipe+0x3ed/0x840 fs/splice.c:562 splice_from_pipe fs/splice.c:597 [inline] generic_splice_sendpage+0xd5/0x140 fs/splice.c:743 do_splice_from fs/splice.c:764 [inline] direct_splice_actor+0x10f/0x170 fs/splice.c:933 splice_direct_to_actor+0x387/0x980 fs/splice.c:888 do_splice_direct+0x1c4/0x290 fs/splice.c:976 do_sendfile+0x54f/0x1040 fs/read_write.c:1257 __do_sys_sendfile64 fs/read_write.c:1318 [inline] __se_sys_sendfile64 fs/read_write.c:1304 [inline] __x64_sys_sendfile64+0x1cd/0x210 fs/read_write.c:1304 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:00007fadb6281188 EFLAGS: 00000246 ORIG_RAX: 0000000000000028 RAX: ffffffffffffffda RBX: 000000000056c038 RCX: 0000000000466609 RDX: 0000000000000000 RSI: 0000000000000003 RDI: 0000000000000005 RBP: 00007fadb62811d0 R08: 0000000000000000 R09: 0000000000000000 R10: 000000007ffffffc R11: 0000000000000246 R12: 0000000000000002 R13: 00007ffcff2d5faf R14: 00007fadb6281300 R15: 0000000000022000 EXT4-fs (loop7): mounted filesystem without journal. Opts: ,errors=continue ext4 filesystem being mounted at /syzkaller-testdir120470177/syzkaller.GbtxHZ/422/file0 supports timestamps until 2038 (0x7fffffff)