EXT4-fs (loop1): mounted filesystem 00000000-0000-0000-0000-000000000000 without journal. Quota mode: writeback. ====================================================== WARNING: possible circular locking dependency detected 6.2.0-rc1-syzkaller #0 Tainted: G W ------------------------------------------------------ syz-executor.1/4793 is trying to acquire lock: ff60000027acc460 (sb_writers#4){.+.+}-{0:0}, at: ext4_multi_mount_protect+0x3e8/0x74a fs/ext4/mmp.c:343 but task is already holding lock: ff60000027acc0e0 (&type->s_umount_key#31){++++}-{3:3}, at: vfs_fsconfig_locked fs/fsopen.c:253 [inline] ff60000027acc0e0 (&type->s_umount_key#31){++++}-{3:3}, at: __do_sys_fsconfig fs/fsopen.c:439 [inline] ff60000027acc0e0 (&type->s_umount_key#31){++++}-{3:3}, at: sys_fsconfig+0x878/0x93a fs/fsopen.c:314 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 (&type->s_umount_key#31){++++}-{3:3}: lock_acquire.part.0+0x1d0/0x424 kernel/locking/lockdep.c:5668 lock_acquire+0x54/0x6a kernel/locking/lockdep.c:5641 down_read+0x3c/0x54 kernel/locking/rwsem.c:1509 __do_sys_quotactl_fd fs/quota/quota.c:999 [inline] sys_quotactl_fd+0x282/0x360 fs/quota/quota.c:972 ret_from_syscall+0x0/0x2 -> #0 (sb_writers#4){.+.+}-{0:0}: check_noncircular+0x1de/0x1fe kernel/locking/lockdep.c:2177 check_prev_add kernel/locking/lockdep.c:3097 [inline] check_prevs_add kernel/locking/lockdep.c:3216 [inline] validate_chain kernel/locking/lockdep.c:3831 [inline] __lock_acquire+0x198a/0x347a kernel/locking/lockdep.c:5055 lock_acquire.part.0+0x1d0/0x424 kernel/locking/lockdep.c:5668 lock_acquire+0x54/0x6a kernel/locking/lockdep.c:5641 percpu_down_read include/linux/percpu-rwsem.h:51 [inline] __sb_start_write include/linux/fs.h:1811 [inline] sb_start_write include/linux/fs.h:1886 [inline] write_mmp_block+0xc8/0x7c4 fs/ext4/mmp.c:50 ext4_multi_mount_protect+0x3e8/0x74a fs/ext4/mmp.c:343 __ext4_remount fs/ext4/super.c:6513 [inline] ext4_reconfigure+0x15b8/0x165a fs/ext4/super.c:6612 reconfigure_super+0x1c8/0x492 fs/super.c:935 vfs_fsconfig_locked fs/fsopen.c:254 [inline] __do_sys_fsconfig fs/fsopen.c:439 [inline] sys_fsconfig+0x87e/0x93a fs/fsopen.c:314 ret_from_syscall+0x0/0x2 other info that might help us debug this: Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&type->s_umount_key#31); lock(sb_writers#4); lock(&type->s_umount_key#31); lock(sb_writers#4); *** DEADLOCK *** 2 locks held by syz-executor.1/4793: #0: ff60000012312870 (&fc->uapi_mutex){+.+.}-{3:3}, at: __do_sys_fsconfig fs/fsopen.c:437 [inline] #0: ff60000012312870 (&fc->uapi_mutex){+.+.}-{3:3}, at: sys_fsconfig+0x46c/0x93a fs/fsopen.c:314 #1: ff60000027acc0e0 (&type->s_umount_key#31){++++}-{3:3}, at: vfs_fsconfig_locked fs/fsopen.c:253 [inline] #1: ff60000027acc0e0 (&type->s_umount_key#31){++++}-{3:3}, at: __do_sys_fsconfig fs/fsopen.c:439 [inline] #1: ff60000027acc0e0 (&type->s_umount_key#31){++++}-{3:3}, at: sys_fsconfig+0x878/0x93a fs/fsopen.c:314 stack backtrace: CPU: 1 PID: 4793 Comm: syz-executor.1 Tainted: G W 6.2.0-rc1-syzkaller #0 Hardware name: riscv-virtio,qemu (DT) Call Trace: [] dump_backtrace+0x2e/0x3c arch/riscv/kernel/stacktrace.c:121 [] show_stack+0x34/0x40 arch/riscv/kernel/stacktrace.c:127 [] __dump_stack lib/dump_stack.c:88 [inline] [] dump_stack_lvl+0xe0/0x14c lib/dump_stack.c:106 [] dump_stack+0x1c/0x24 lib/dump_stack.c:113 [] print_circular_bug+0x370/0x3fa kernel/locking/lockdep.c:2055 [] check_noncircular+0x1de/0x1fe kernel/locking/lockdep.c:2177 [] check_prev_add kernel/locking/lockdep.c:3097 [inline] [] check_prevs_add kernel/locking/lockdep.c:3216 [inline] [] validate_chain kernel/locking/lockdep.c:3831 [inline] [] __lock_acquire+0x198a/0x347a kernel/locking/lockdep.c:5055 [] lock_acquire.part.0+0x1d0/0x424 kernel/locking/lockdep.c:5668 [] lock_acquire+0x54/0x6a kernel/locking/lockdep.c:5641 [] percpu_down_read include/linux/percpu-rwsem.h:51 [inline] [] __sb_start_write include/linux/fs.h:1811 [inline] [] sb_start_write include/linux/fs.h:1886 [inline] [] write_mmp_block+0xc8/0x7c4 fs/ext4/mmp.c:50 [] ext4_multi_mount_protect+0x3e8/0x74a fs/ext4/mmp.c:343 [] __ext4_remount fs/ext4/super.c:6513 [inline] [] ext4_reconfigure+0x15b8/0x165a fs/ext4/super.c:6612 [] reconfigure_super+0x1c8/0x492 fs/super.c:935 [] vfs_fsconfig_locked fs/fsopen.c:254 [inline] [] __do_sys_fsconfig fs/fsopen.c:439 [inline] [] sys_fsconfig+0x87e/0x93a fs/fsopen.c:314 [] ret_from_syscall+0x0/0x2 EXT4-fs warning (device loop1): ext4_enable_quotas:6967: Failed to enable quota tracking (type=2, err=-22, ino=15). Please run e2fsck to fix.