====================================================== WARNING: possible circular locking dependency detected 6.2.0-rc1-syzkaller #0 Tainted: G W ------------------------------------------------------ syz-executor.1/7402 is trying to acquire lock: ff6000001273a0e0 (&type->s_umount_key#31){++++}-{3:3}, at: __do_sys_quotactl_fd fs/quota/quota.c:999 [inline] ff6000001273a0e0 (&type->s_umount_key#31){++++}-{3:3}, at: sys_quotactl_fd+0x282/0x360 fs/quota/quota.c:972 but task is already holding lock: ff6000001273a460 (sb_writers#4){.+.+}-{0:0}, at: __sb_start_write include/linux/fs.h:1811 [inline] ff6000001273a460 (sb_writers#4){.+.+}-{0:0}, at: sb_start_write include/linux/fs.h:1886 [inline] ff6000001273a460 (sb_writers#4){.+.+}-{0:0}, at: mnt_want_write+0x2c/0x78 fs/namespace.c:508 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 (sb_writers#4){.+.+}-{0:0}: 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 -> #0 (&type->s_umount_key#31){++++}-{3:3}: 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 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 other info that might help us debug this: Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(sb_writers#4); lock(&type->s_umount_key#31); lock(sb_writers#4); lock(&type->s_umount_key#31); *** DEADLOCK *** 1 lock held by syz-executor.1/7402: #0: ff6000001273a460 (sb_writers#4){.+.+}-{0:0}, at: __sb_start_write include/linux/fs.h:1811 [inline] #0: ff6000001273a460 (sb_writers#4){.+.+}-{0:0}, at: sb_start_write include/linux/fs.h:1886 [inline] #0: ff6000001273a460 (sb_writers#4){.+.+}-{0:0}, at: mnt_want_write+0x2c/0x78 fs/namespace.c:508 stack backtrace: CPU: 1 PID: 7402 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 [] 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