syzbot


possible deadlock in quotactl_fd

Status: upstream: reported C repro on 2026/04/19 20:04
Reported-by: syzbot+1b1ee4d8785631fe2873@syzkaller.appspotmail.com
First crash: 1d22h, last: 1d20h
Similar bugs (5)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream possible deadlock in quotactl_fd ext4 4 C error done 141 1025d 1106d 23/29 fixed on 2023/08/17 04:20
upstream possible deadlock in sys_quotactl_fd ext4 4 C 423 1072d 1106d 0/29 auto-obsoleted due to no activity on 2023/08/13 08:22
linux-5.15 possible deadlock in sys_quotactl_fd origin:upstream 4 C done 167 1063d 1112d 3/3 fixed on 2023/06/26 14:47
linux-6.1 possible deadlock in sys_quotactl_fd origin:lts-only 4 C inconclusive 177 1013d 1112d 0/3 upstream: reported C repro on 2023/04/05 01:50
linux-5.15 possible deadlock in sys_quotactl_fd (2) 4 1 363d 363d 0/3 auto-obsoleted due to no activity on 2025/08/01 15:27

Sample crash report:
REISERFS (device loop0): Using r5 hash to sort names
REISERFS warning (device loop0): vs-13060 reiserfs_update_sd_size: stat data of object [1 2 0x0 SD] (nlink == 1) not found (pos 2)
REISERFS (device loop0): Created .reiserfs_priv - reserved for xattr storage.
======================================================
WARNING: possible circular locking dependency detected
syzkaller #0 Not tainted
------------------------------------------------------
syz.0.36/4408 is trying to acquire lock:
ffff88801ed1c0e0 (&type->s_umount_key#53){+.+.}-{3:3}, at: __do_sys_quotactl_fd fs/quota/quota.c:996 [inline]
ffff88801ed1c0e0 (&type->s_umount_key#53){+.+.}-{3:3}, at: __se_sys_quotactl_fd+0x24c/0x3b0 fs/quota/quota.c:971

but task is already holding lock:
ffff88801ed1c460 (sb_writers#13){.+.+}-{0:0}, at: mnt_want_write+0x3d/0x90 fs/namespace.c:386

which lock already depends on the new lock.


the existing dependency chain (in reverse order) is:

-> #2 (sb_writers#13){.+.+}-{0:0}:
       percpu_down_read include/linux/percpu-rwsem.h:51 [inline]
       __sb_start_write include/linux/fs.h:1811 [inline]
       sb_start_write+0x4f/0x1c0 include/linux/fs.h:1881
       mnt_want_write_file+0x5c/0x200 fs/namespace.c:430
       reiserfs_ioctl+0x10a/0x330 fs/reiserfs/ioctl.c:103
       vfs_ioctl fs/ioctl.c:51 [inline]
       __do_sys_ioctl fs/ioctl.c:874 [inline]
       __se_sys_ioctl+0xfa/0x170 fs/ioctl.c:860
       do_syscall_x64 arch/x86/entry/common.c:50 [inline]
       do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80
       entry_SYSCALL_64_after_hwframe+0x66/0xd0

-> #1 (&sbi->lock){+.+.}-{3:3}:
       __mutex_lock_common+0x1e3/0x2400 kernel/locking/mutex.c:596
       __mutex_lock kernel/locking/mutex.c:729 [inline]
       mutex_lock_nested+0x17/0x20 kernel/locking/mutex.c:743
       reiserfs_write_lock+0x75/0xd0 fs/reiserfs/lock.c:27
       reiserfs_put_super+0xc6/0x510 fs/reiserfs/super.c:596
       generic_shutdown_super+0x130/0x300 fs/super.c:475
       kill_block_super+0x7c/0xe0 fs/super.c:1427
       deactivate_locked_super+0x93/0xf0 fs/super.c:335
       cleanup_mnt+0x42d/0x4e0 fs/namespace.c:1148
       task_work_run+0x125/0x1a0 kernel/task_work.c:188
       tracehook_notify_resume include/linux/tracehook.h:189 [inline]
       exit_to_user_mode_loop+0x10f/0x130 kernel/entry/common.c:181
       exit_to_user_mode_prepare+0xee/0x180 kernel/entry/common.c:214
       __syscall_exit_to_user_mode_work kernel/entry/common.c:296 [inline]
       syscall_exit_to_user_mode+0x16/0x40 kernel/entry/common.c:307
       do_syscall_64+0x58/0xa0 arch/x86/entry/common.c:86
       entry_SYSCALL_64_after_hwframe+0x66/0xd0

-> #0 (&type->s_umount_key#53){+.+.}-{3:3}:
       check_prev_add kernel/locking/lockdep.c:3053 [inline]
       check_prevs_add kernel/locking/lockdep.c:3172 [inline]
       validate_chain kernel/locking/lockdep.c:3788 [inline]
       __lock_acquire+0x2c42/0x7d10 kernel/locking/lockdep.c:5012
       lock_acquire+0x19e/0x400 kernel/locking/lockdep.c:5623
       down_write+0x38/0x60 kernel/locking/rwsem.c:1551
       __do_sys_quotactl_fd fs/quota/quota.c:996 [inline]
       __se_sys_quotactl_fd+0x24c/0x3b0 fs/quota/quota.c:971
       do_syscall_x64 arch/x86/entry/common.c:50 [inline]
       do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80
       entry_SYSCALL_64_after_hwframe+0x66/0xd0

other info that might help us debug this:

Chain exists of:
  &type->s_umount_key#53 --> &sbi->lock --> sb_writers#13

 Possible unsafe locking scenario:

       CPU0                    CPU1
       ----                    ----
  lock(sb_writers#13);
                               lock(&sbi->lock);
                               lock(sb_writers#13);
  lock(&type->s_umount_key#53);

 *** DEADLOCK ***

1 lock held by syz.0.36/4408:
 #0: ffff88801ed1c460 (sb_writers#13){.+.+}-{0:0}, at: mnt_want_write+0x3d/0x90 fs/namespace.c:386

stack backtrace:
CPU: 0 PID: 4408 Comm: syz.0.36 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/18/2026
Call Trace:
 <TASK>
 dump_stack_lvl+0x188/0x250 lib/dump_stack.c:106
 check_noncircular+0x296/0x330 kernel/locking/lockdep.c:2133
 check_prev_add kernel/locking/lockdep.c:3053 [inline]
 check_prevs_add kernel/locking/lockdep.c:3172 [inline]
 validate_chain kernel/locking/lockdep.c:3788 [inline]
 __lock_acquire+0x2c42/0x7d10 kernel/locking/lockdep.c:5012
 lock_acquire+0x19e/0x400 kernel/locking/lockdep.c:5623
 down_write+0x38/0x60 kernel/locking/rwsem.c:1551
 __do_sys_quotactl_fd fs/quota/quota.c:996 [inline]
 __se_sys_quotactl_fd+0x24c/0x3b0 fs/quota/quota.c:971
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x66/0xd0
RIP: 0033:0x7fda8452b819
Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 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 e8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fff4611bb88 EFLAGS: 00000246 ORIG_RAX: 00000000000001bb
RAX: ffffffffffffffda RBX: 00007fda847a4fa0 RCX: 00007fda8452b819
RDX: 0000000000000000 RSI: ffffffff80000301 RDI: 0000000000000004
RBP: 00007fda845c1c91 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007fda847a4fac R14: 00007fda847a4fa0 R15: 00007fda847a4fa0
 </TASK>

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/04/19 22:16 linux-5.15.y b9d57c40a767 303e2802 .config console log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro #1 (corrupt fs)] [mounted in repro #2 (corrupt fs)] ci2-linux-5-15-kasan possible deadlock in quotactl_fd
2026/04/19 20:04 linux-5.15.y b9d57c40a767 303e2802 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in quotactl_fd
* Struck through repros no longer work on HEAD.