device veth21 entered promiscuous mode IPv6: ADDRCONF(NETDEV_UP): veth21: link is not ready EXT4-fs (loop1): mounted filesystem without journal. Opts: ,errors=continue ====================================================== WARNING: possible circular locking dependency detected 4.19.211-syzkaller #0 Not tainted ------------------------------------------------------ syz-executor.1/28167 is trying to acquire lock: 00000000e1729303 (&ei->i_data_sem/2){++++}, at: ext4_map_blocks+0x33e/0x1a50 fs/ext4/inode.c:578 but task is already holding lock: 0000000088b7abc5 (&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] do_iter_readv_writev+0x668/0x790 fs/read_write.c:681 do_iter_write+0x182/0x5d0 fs/read_write.c:960 vfs_iter_write+0x70/0xa0 fs/read_write.c:973 iter_file_splice_write+0x60d/0xbb0 fs/splice.c:750 do_splice_from fs/splice.c:852 [inline] direct_splice_actor+0x115/0x160 fs/splice.c:1025 splice_direct_to_actor+0x33f/0x8d0 fs/splice.c:980 do_splice_direct+0x1a7/0x270 fs/splice.c:1068 do_sendfile+0x550/0xc30 fs/read_write.c:1447 __do_sys_sendfile64 fs/read_write.c:1508 [inline] __se_sys_sendfile64+0x147/0x160 fs/read_write.c:1494 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 get_free_dqblk+0xff/0x2d0 fs/quota/quota_tree.c:101 do_insert_tree+0x79c/0x1150 fs/quota/quota_tree.c:308 do_insert_tree+0xf5c/0x1150 fs/quota/quota_tree.c:339 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_transfer+0x3a3/0x4c0 fs/quota/dquot.c:2079 ext4_setattr+0x58a/0x2560 fs/ext4/inode.c:5604 notify_change+0x70b/0xfc0 fs/attr.c:334 chown_common+0x4a9/0x550 fs/open.c:651 do_fchownat+0x126/0x1e0 fs/open.c:681 __do_sys_lchown fs/open.c:706 [inline] __se_sys_lchown fs/open.c:704 [inline] __x64_sys_lchown+0x7a/0xc0 fs/open.c:704 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 *** 5 locks held by syz-executor.1/28167: #0: 00000000358580d0 (sb_writers#3){.+.+}, at: sb_start_write include/linux/fs.h:1579 [inline] #0: 00000000358580d0 (sb_writers#3){.+.+}, at: mnt_want_write+0x3a/0xb0 fs/namespace.c:360 #1: 0000000009ae02cc (&sb->s_type->i_mutex_key#10){++++}, at: inode_lock include/linux/fs.h:748 [inline] #1: 0000000009ae02cc (&sb->s_type->i_mutex_key#10){++++}, at: chown_common+0x2d0/0x550 fs/open.c:648 #2: 0000000061d0fcfd (&ei->xattr_sem){++++}, at: ext4_setattr+0x57f/0x2560 fs/ext4/inode.c:5603 #3: 000000009f15e98f (&dquot->dq_lock){+.+.}, at: dquot_acquire+0x54/0x490 fs/quota/dquot.c:426 #4: 0000000088b7abc5 (&s->s_dquot.dqio_sem){++++}, at: v2_write_dquot+0x8b/0x250 fs/quota/quota_v2.c:355 stack backtrace: CPU: 0 PID: 28167 Comm: syz-executor.1 Not tainted 4.19.211-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/21/2023 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 get_free_dqblk+0xff/0x2d0 fs/quota/quota_tree.c:101 do_insert_tree+0x79c/0x1150 fs/quota/quota_tree.c:308 do_insert_tree+0xf5c/0x1150 fs/quota/quota_tree.c:339 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_transfer+0x3a3/0x4c0 fs/quota/dquot.c:2079 ext4_setattr+0x58a/0x2560 fs/ext4/inode.c:5604 notify_change+0x70b/0xfc0 fs/attr.c:334 chown_common+0x4a9/0x550 fs/open.c:651 do_fchownat+0x126/0x1e0 fs/open.c:681 __do_sys_lchown fs/open.c:706 [inline] __se_sys_lchown fs/open.c:704 [inline] __x64_sys_lchown+0x7a/0xc0 fs/open.c:704 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x7f56cf7df0f9 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 f1 19 00 00 90 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 b8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f56cdd51168 EFLAGS: 00000246 ORIG_RAX: 000000000000005e RAX: ffffffffffffffda RBX: 00007f56cf8fef80 RCX: 00007f56cf7df0f9 RDX: 0000000000000000 RSI: 000000000000ee01 RDI: 0000000020000240 RBP: 00007f56cf83aae9 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007fffaec0409f R14: 00007f56cdd51300 R15: 0000000000022000 sched: RT throttling activated netlink: 24 bytes leftover after parsing attributes in process `syz-executor.0'. device veth23 entered promiscuous mode IPv6: ADDRCONF(NETDEV_UP): veth23: link is not ready netlink: 24 bytes leftover after parsing attributes in process `syz-executor.3'. device veth9 entered promiscuous mode IPv6: ADDRCONF(NETDEV_UP): veth9: link is not ready validate_nla: 15 callbacks suppressed netlink: 'syz-executor.4': attribute type 3 has an invalid length. netlink: 'syz-executor.4': attribute type 3 has an invalid length. EXT4-fs (loop1): mounted filesystem without journal. Opts: ,errors=continue audit: type=1804 audit(1677013279.758:6303): pid=28232 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=invalid_pcr cause=ToMToU comm="syz-executor.2" name="/root/syzkaller-testdir164526348/syzkaller.HpmTBU/451/file0" dev="sda1" ino=14559 res=1 netlink: 24 bytes leftover after parsing attributes in process `syz-executor.0'. device veth25 entered promiscuous mode IPv6: ADDRCONF(NETDEV_UP): veth25: link is not ready netlink: 24 bytes leftover after parsing attributes in process `syz-executor.3'. device veth11 entered promiscuous mode IPv6: ADDRCONF(NETDEV_UP): veth11: link is not ready EXT4-fs (loop1): mounted filesystem without journal. Opts: ,errors=continue netlink: 24 bytes leftover after parsing attributes in process `syz-executor.0'. device veth27 entered promiscuous mode IPv6: ADDRCONF(NETDEV_UP): veth27: link is not ready EXT4-fs (loop1): mounted filesystem without journal. Opts: ,errors=continue netlink: 24 bytes leftover after parsing attributes in process `syz-executor.3'. device veth13 entered promiscuous mode IPv6: ADDRCONF(NETDEV_UP): veth13: link is not ready EXT4-fs (loop2): error count since last fsck: 1 EXT4-fs (loop2): initial error at time 1677012980: ext4_orphan_get:1256 EXT4-fs (loop2): last error at time 1677012980: ext4_orphan_get:1256