====================================================== WARNING: possible circular locking dependency detected 6.4.0-rc1-syzkaller-00011-g99a670b2069c #0 Not tainted ------------------------------------------------------ syz-executor.0/15974 is trying to acquire lock: ff6000002ce06460 (sb_writers#4){.+.+}-{0:0}, at: ext4_multi_mount_protect+0x3e8/0x75c fs/ext4/mmp.c:347 but task is already holding lock: ff6000002ce060e0 (&type->s_umount_key#31){++++}-{3:3}, at: vfs_fsconfig_locked fs/fsopen.c:253 [inline] ff6000002ce060e0 (&type->s_umount_key#31){++++}-{3:3}, at: __do_sys_fsconfig fs/fsopen.c:439 [inline] ff6000002ce060e0 (&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 kernel/locking/lockdep.c:5691 [inline] lock_acquire+0x276/0x588 kernel/locking/lockdep.c:5656 down_read+0x3c/0x54 kernel/locking/rwsem.c:1520 __do_sys_quotactl_fd fs/quota/quota.c:999 [inline] sys_quotactl_fd+0x282/0x360 fs/quota/quota.c:972 syscall_handler+0xfa/0x148 arch/riscv/include/asm/syscall.h:90 do_trap_ecall_u+0xea/0xec arch/riscv/kernel/traps.c:279 ret_from_exception+0x0/0x64 arch/riscv/kernel/entry.S:102 -> #0 (sb_writers#4){.+.+}-{0:0}: check_noncircular+0x1da/0x1fa kernel/locking/lockdep.c:2188 check_prev_add kernel/locking/lockdep.c:3108 [inline] check_prevs_add kernel/locking/lockdep.c:3227 [inline] validate_chain kernel/locking/lockdep.c:3842 [inline] __lock_acquire+0x19aa/0x34a2 kernel/locking/lockdep.c:5074 lock_acquire kernel/locking/lockdep.c:5691 [inline] lock_acquire+0x276/0x588 kernel/locking/lockdep.c:5656 percpu_down_read include/linux/percpu-rwsem.h:51 [inline] __sb_start_write include/linux/fs.h:1494 [inline] sb_start_write include/linux/fs.h:1569 [inline] write_mmp_block+0xc8/0x80c fs/ext4/mmp.c:50 ext4_multi_mount_protect+0x3e8/0x75c fs/ext4/mmp.c:347 __ext4_remount fs/ext4/super.c:6578 [inline] ext4_reconfigure+0x15e6/0x168a fs/ext4/super.c:6677 reconfigure_super+0x1c8/0x492 fs/super.c:956 vfs_fsconfig_locked fs/fsopen.c:254 [inline] __do_sys_fsconfig fs/fsopen.c:439 [inline] sys_fsconfig+0x87e/0x93a fs/fsopen.c:314 syscall_handler+0xfa/0x148 arch/riscv/include/asm/syscall.h:90 do_trap_ecall_u+0xea/0xec arch/riscv/kernel/traps.c:279 ret_from_exception+0x0/0x64 arch/riscv/kernel/entry.S:102 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); rlock(sb_writers#4); *** DEADLOCK *** 2 locks held by syz-executor.0/15974: #0: ff600000167d4470 (&fc->uapi_mutex){+.+.}-{3:3}, at: __do_sys_fsconfig fs/fsopen.c:437 [inline] #0: ff600000167d4470 (&fc->uapi_mutex){+.+.}-{3:3}, at: sys_fsconfig+0x46c/0x93a fs/fsopen.c:314 #1: ff6000002ce060e0 (&type->s_umount_key#31){++++}-{3:3}, at: vfs_fsconfig_locked fs/fsopen.c:253 [inline] #1: ff6000002ce060e0 (&type->s_umount_key#31){++++}-{3:3}, at: __do_sys_fsconfig fs/fsopen.c:439 [inline] #1: ff6000002ce060e0 (&type->s_umount_key#31){++++}-{3:3}, at: sys_fsconfig+0x878/0x93a fs/fsopen.c:314 stack backtrace: CPU: 0 PID: 15974 Comm: syz-executor.0 Not tainted 6.4.0-rc1-syzkaller-00011-g99a670b2069c #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+0x3ae/0x47c kernel/locking/lockdep.c:2066 [] check_noncircular+0x1da/0x1fa kernel/locking/lockdep.c:2188 [] check_prev_add kernel/locking/lockdep.c:3108 [inline] [] check_prevs_add kernel/locking/lockdep.c:3227 [inline] [] validate_chain kernel/locking/lockdep.c:3842 [inline] [] __lock_acquire+0x19aa/0x34a2 kernel/locking/lockdep.c:5074 [] lock_acquire kernel/locking/lockdep.c:5691 [inline] [] lock_acquire+0x276/0x588 kernel/locking/lockdep.c:5656 [] percpu_down_read include/linux/percpu-rwsem.h:51 [inline] [] __sb_start_write include/linux/fs.h:1494 [inline] [] sb_start_write include/linux/fs.h:1569 [inline] [] write_mmp_block+0xc8/0x80c fs/ext4/mmp.c:50 [] ext4_multi_mount_protect+0x3e8/0x75c fs/ext4/mmp.c:347 [] __ext4_remount fs/ext4/super.c:6578 [inline] [] ext4_reconfigure+0x15e6/0x168a fs/ext4/super.c:6677 [] reconfigure_super+0x1c8/0x492 fs/super.c:956 [] vfs_fsconfig_locked fs/fsopen.c:254 [inline] [] __do_sys_fsconfig fs/fsopen.c:439 [inline] [] sys_fsconfig+0x87e/0x93a fs/fsopen.c:314 [] syscall_handler+0xfa/0x148 arch/riscv/include/asm/syscall.h:90 [] do_trap_ecall_u+0xea/0xec arch/riscv/kernel/traps.c:279 [] ret_from_exception+0x0/0x64 arch/riscv/kernel/entry.S:102 EXT4-fs warning (device loop0): ext4_enable_quotas:7015: Failed to enable quota tracking (type=2, err=-22, ino=15). Please run e2fsck to fix.