====================================================== WARNING: possible circular locking dependency detected 4.19.211-syzkaller #0 Not tainted ------------------------------------------------------ syz-executor.3/23544 is trying to acquire lock: 000000003240a84a (&ei->i_data_sem/1){+.+.}, at: ext4_double_down_write_data_sem fs/ext4/move_extent.c:55 [inline] 000000003240a84a (&ei->i_data_sem/1){+.+.}, at: ext4_double_down_write_data_sem+0x3e/0x70 fs/ext4/move_extent.c:51 but task is already holding lock: 000000005a6631c9 (&ei->i_data_sem/2){++++}, at: ext4_double_down_write_data_sem fs/ext4/move_extent.c:54 [inline] 000000005a6631c9 (&ei->i_data_sem/2){++++}, at: ext4_double_down_write_data_sem+0x31/0x70 fs/ext4/move_extent.c:51 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #3 (&ei->i_data_sem/2){++++}: 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 -> #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] swap_inode_boot_loader fs/ext4/ioctl.c:236 [inline] ext4_ioctl+0x3e38/0x3eb0 fs/ext4/ioctl.c:990 vfs_ioctl fs/ioctl.c:46 [inline] file_ioctl fs/ioctl.c:501 [inline] do_vfs_ioctl+0xcdb/0x12e0 fs/ioctl.c:688 ksys_ioctl+0x9b/0xc0 fs/ioctl.c:705 __do_sys_ioctl fs/ioctl.c:712 [inline] __se_sys_ioctl fs/ioctl.c:710 [inline] __x64_sys_ioctl+0x6f/0xb0 fs/ioctl.c:710 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe -> #0 (&ei->i_data_sem/1){+.+.}: down_write_nested+0x36/0x90 kernel/locking/rwsem.c:192 ext4_double_down_write_data_sem fs/ext4/move_extent.c:55 [inline] ext4_double_down_write_data_sem+0x3e/0x70 fs/ext4/move_extent.c:51 swap_inode_boot_loader fs/ext4/ioctl.c:170 [inline] ext4_ioctl+0x1938/0x3eb0 fs/ext4/ioctl.c:990 vfs_ioctl fs/ioctl.c:46 [inline] file_ioctl fs/ioctl.c:501 [inline] do_vfs_ioctl+0xcdb/0x12e0 fs/ioctl.c:688 ksys_ioctl+0x9b/0xc0 fs/ioctl.c:705 __do_sys_ioctl fs/ioctl.c:712 [inline] __se_sys_ioctl fs/ioctl.c:710 [inline] __x64_sys_ioctl+0x6f/0xb0 fs/ioctl.c:710 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/1 --> &s->s_dquot.dqio_sem --> &ei->i_data_sem/2 Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&ei->i_data_sem/2); lock(&s->s_dquot.dqio_sem); lock(&ei->i_data_sem/2); lock(&ei->i_data_sem/1); *** DEADLOCK *** 5 locks held by syz-executor.3/23544: #0: 00000000de55fba5 (sb_writers#3){.+.+}, at: sb_start_write include/linux/fs.h:1579 [inline] #0: 00000000de55fba5 (sb_writers#3){.+.+}, at: mnt_want_write_file+0x63/0x1d0 fs/namespace.c:418 #1: 00000000b2b5ad3a (&sb->s_type->i_mutex_key#10){++++}, at: inode_lock include/linux/fs.h:748 [inline] #1: 00000000b2b5ad3a (&sb->s_type->i_mutex_key#10){++++}, at: lock_two_nondirectories+0xec/0x110 fs/inode.c:1015 #2: 000000004d8ee819 (&sb->s_type->i_mutex_key#10/4){+.+.}, at: inode_lock_nested include/linux/fs.h:783 [inline] #2: 000000004d8ee819 (&sb->s_type->i_mutex_key#10/4){+.+.}, at: lock_two_nondirectories+0xd1/0x110 fs/inode.c:1017 jfs: Unrecognized mount option "" or missing value #3: 0000000064460a58 (&ei->i_mmap_sem){++++}, at: swap_inode_boot_loader fs/ext4/ioctl.c:147 [inline] #3: 0000000064460a58 (&ei->i_mmap_sem){++++}, at: ext4_ioctl+0x181b/0x3eb0 fs/ext4/ioctl.c:990 #4: 000000005a6631c9 (&ei->i_data_sem/2){++++}, at: ext4_double_down_write_data_sem fs/ext4/move_extent.c:54 [inline] #4: 000000005a6631c9 (&ei->i_data_sem/2){++++}, at: ext4_double_down_write_data_sem+0x31/0x70 fs/ext4/move_extent.c:51 stack backtrace: CPU: 0 PID: 23544 Comm: syz-executor.3 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_write_nested+0x36/0x90 kernel/locking/rwsem.c:192 ext4_double_down_write_data_sem fs/ext4/move_extent.c:55 [inline] ext4_double_down_write_data_sem+0x3e/0x70 fs/ext4/move_extent.c:51 swap_inode_boot_loader fs/ext4/ioctl.c:170 [inline] ext4_ioctl+0x1938/0x3eb0 fs/ext4/ioctl.c:990 vfs_ioctl fs/ioctl.c:46 [inline] file_ioctl fs/ioctl.c:501 [inline] do_vfs_ioctl+0xcdb/0x12e0 fs/ioctl.c:688 ksys_ioctl+0x9b/0xc0 fs/ioctl.c:705 __do_sys_ioctl fs/ioctl.c:712 [inline] __se_sys_ioctl fs/ioctl.c:710 [inline] __x64_sys_ioctl+0x6f/0xb0 fs/ioctl.c:710 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x7f6b4b2160c9 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:00007f6b49788168 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007f6b4b335f80 RCX: 00007f6b4b2160c9 RDX: 0000000000000000 RSI: 0000000000006611 RDI: 0000000000000004 RBP: 00007f6b4b271ae9 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffd3e07b50f R14: 00007f6b49788300 R15: 0000000000022000 netlink: 12 bytes leftover after parsing attributes in process `syz-executor.2'. netlink: 12 bytes leftover after parsing attributes in process `syz-executor.2'. netlink: 12 bytes leftover after parsing attributes in process `syz-executor.0'. netlink: 12 bytes leftover after parsing attributes in process `syz-executor.2'. netlink: 40 bytes leftover after parsing attributes in process `syz-executor.4'. netlink: 8 bytes leftover after parsing attributes in process `syz-executor.2'. netlink: 44 bytes leftover after parsing attributes in process `syz-executor.2'. netlink: 12 bytes leftover after parsing attributes in process `syz-executor.0'. netlink: 8 bytes leftover after parsing attributes in process `syz-executor.2'. netlink: 40 bytes leftover after parsing attributes in process `syz-executor.4'. overlayfs: fs on './file0' does not support file handles, falling back to index=off,nfs_export=off. overlayfs: failed to resolve './file1': -2 overlayfs: overlapping lowerdir path batman_adv: Cannot find parent device device gretap1 entered promiscuous mode overlayfs: fs on './file0' does not support file handles, falling back to index=off,nfs_export=off. overlayfs: fs on './file0' does not support file handles, falling back to index=off,nfs_export=off. batman_adv: Cannot find parent device device gretap1 entered promiscuous mode overlayfs: fs on './file0' does not support file handles, falling back to index=off,nfs_export=off. overlayfs: fs on './file0' does not support file handles, falling back to index=off,nfs_export=off. ieee80211 ©,í…×: Selected rate control algorithm 'minstrel_ht' audit: type=1804 audit(1673617053.240:382): pid=23915 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=invalid_pcr cause=open_writers comm="syz-executor.5" name="/root/syzkaller-testdir1991359233/syzkaller.rO4Wgb/321/bus" dev="sda1" ino=14370 res=1 batman_adv: Cannot find parent device device gretap1 entered promiscuous mode overlayfs: './file0' not a directory audit: type=1804 audit(1673617053.460:383): pid=23948 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=invalid_pcr cause=open_writers comm="syz-executor.5" name="/root/syzkaller-testdir1991359233/syzkaller.rO4Wgb/322/bus" dev="sda1" ino=14419 res=1 audit: type=1804 audit(1673617053.590:384): pid=23954 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=invalid_pcr cause=open_writers comm="syz-executor.5" name="/root/syzkaller-testdir1991359233/syzkaller.rO4Wgb/323/bus" dev="sda1" ino=14294 res=1 audit: type=1804 audit(1673617053.590:385): pid=23954 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=invalid_pcr cause=open_writers comm="syz-executor.5" name="/root/syzkaller-testdir1991359233/syzkaller.rO4Wgb/323/bus" dev="sda1" ino=14294 res=1 overlayfs: fs on './file0' does not support file handles, falling back to index=off,nfs_export=off. audit: type=1804 audit(1673617053.590:386): pid=23954 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=invalid_pcr cause=open_writers comm="syz-executor.5" name="/root/syzkaller-testdir1991359233/syzkaller.rO4Wgb/323/bus" dev="sda1" ino=14294 res=1 audit: type=1804 audit(1673617053.590:387): pid=23954 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=invalid_pcr cause=open_writers comm="syz-executor.5" name="/root/syzkaller-testdir1991359233/syzkaller.rO4Wgb/323/bus" dev="sda1" ino=14294 res=1 audit: type=1804 audit(1673617053.590:388): pid=23954 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=invalid_pcr cause=open_writers comm="syz-executor.5" name="/root/syzkaller-testdir1991359233/syzkaller.rO4Wgb/323/bus" dev="sda1" ino=14294 res=1 audit: type=1804 audit(1673617053.590:389): pid=23954 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=invalid_pcr cause=open_writers comm="syz-executor.5" name="/root/syzkaller-testdir1991359233/syzkaller.rO4Wgb/323/bus" dev="sda1" ino=14294 res=1 audit: type=1804 audit(1673617053.590:390): pid=23954 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=invalid_pcr cause=open_writers comm="syz-executor.5" name="/root/syzkaller-testdir1991359233/syzkaller.rO4Wgb/323/bus" dev="sda1" ino=14294 res=1 audit: type=1804 audit(1673617053.590:391): pid=23954 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=invalid_pcr cause=open_writers comm="syz-executor.5" name="/root/syzkaller-testdir1991359233/syzkaller.rO4Wgb/323/bus" dev="sda1" ino=14294 res=1 mmap: syz-executor.5 (23989) uses deprecated remap_file_pages() syscall. See Documentation/vm/remap_file_pages.rst. ieee80211 ©,í…×: Selected rate control algorithm 'minstrel_ht' nla_parse: 5 callbacks suppressed netlink: 16 bytes leftover after parsing attributes in process `syz-executor.1'. batman_adv: Cannot find parent device device gretap1 entered promiscuous mode overlayfs: fs on './file0' does not support file handles, falling back to index=off,nfs_export=off. overlayfs: fs on './file0' does not support file handles, falling back to index=off,nfs_export=off. ieee80211 ©,í…×: Selected rate control algorithm 'minstrel_ht' netlink: 16 bytes leftover after parsing attributes in process `syz-executor.1'. ieee80211 ©,í…×: Selected rate control algorithm 'minstrel_ht' overlayfs: fs on './file0' does not support file handles, falling back to index=off,nfs_export=off. overlayfs: fs on './file0' does not support file handles, falling back to index=off,nfs_export=off. overlayfs: fs on './file0' does not support file handles, falling back to index=off,nfs_export=off. overlayfs: fs on './file0' does not support file handles, falling back to index=off,nfs_export=off. overlayfs: fs on './file0' does not support file handles, falling back to index=off,nfs_export=off. overlayfs: fs on './file0' does not support file handles, falling back to index=off,nfs_export=off. overlayfs: fs on './file0' does not support file handles, falling back to index=off,nfs_export=off. overlayfs: fs on './file0' does not support file handles, falling back to index=off,nfs_export=off. overlayfs: './file0' not a directory overlayfs: fs on './file0' does not support file handles, falling back to index=off,nfs_export=off. overlayfs: fs on './file0' does not support file handles, falling back to index=off,nfs_export=off. overlayfs: fs on './file0' does not support file handles, falling back to index=off,nfs_export=off. overlayfs: fs on './file0' does not support file handles, falling back to index=off,nfs_export=off. overlayfs: fs on './file0' does not support file handles, falling back to index=off,nfs_export=off. overlayfs: fs on './file0' does not support file handles, falling back to index=off,nfs_export=off. overlayfs: fs on './file0' does not support file handles, falling back to index=off,nfs_export=off. overlayfs: fs on './file0' does not support file handles, falling back to index=off,nfs_export=off. overlayfs: fs on './file0' does not support file handles, falling back to index=off,nfs_export=off. overlayfs: fs on './file0' does not support file handles, falling back to index=off,nfs_export=off. overlayfs: fs on './file0' does not support file handles, falling back to index=off,nfs_export=off.