| Title | Replies (including bot) | Last reply |
|---|---|---|
| [syzbot] [btrfs?] possible deadlock in btrfs_quota_enable (2) | 4 (5) | 2025/05/19 17:46 |
syzbot |
sign-in | mailing list | source | docs | 🏰 |
| Title | Replies (including bot) | Last reply |
|---|---|---|
| [syzbot] [btrfs?] possible deadlock in btrfs_quota_enable (2) | 4 (5) | 2025/05/19 17:46 |
BTRFS info (device loop8): turning on async discard
BTRFS info (device loop8): enabling free space tree
BTRFS info (device loop8): force clearing of disk cache
======================================================
WARNING: possible circular locking dependency detected
syzkaller #0 Not tainted
------------------------------------------------------
syz.8.953/12232 is trying to acquire lock:
ffff8880243b22e8 (&fs_info->qgroup_ioctl_lock){+.+.}-{4:4}, at: btrfs_quota_enable+0x2c6/0x2850 fs/btrfs/qgroup.c:1063
but task is already holding lock:
ffff8880243b3138 (btrfs_trans_num_extwriters){++++}-{0:0}, at: join_transaction+0x154/0xd50 fs/btrfs/transaction.c:323
which lock already depends on the new lock.
the existing dependency chain (in reverse order) is:
-> #4 (btrfs_trans_num_extwriters){++++}-{0:0}:
join_transaction+0x192/0xd50 fs/btrfs/transaction.c:324
start_transaction+0xbe9/0x1820 fs/btrfs/transaction.c:719
btrfs_uuid_scan_kthread+0x5df/0xb00 fs/btrfs/uuid-tree.c:456
kthread+0x388/0x470 kernel/kthread.c:436
ret_from_fork+0x514/0xb70 arch/x86/kernel/process.c:158
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
-> #3 (btrfs_trans_num_writers){++++}-{0:0}:
__lock_release kernel/locking/lockdep.c:5574 [inline]
lock_release+0x199/0x3c0 kernel/locking/lockdep.c:5889
percpu_up_read include/linux/percpu-rwsem.h:112 [inline]
__sb_end_write include/linux/fs/super.h:14 [inline]
sb_end_intwrite+0x26/0x1c0 include/linux/fs/super.h:101
__btrfs_end_transaction+0x248/0x650 fs/btrfs/transaction.c:1096
btrfs_dirty_inode+0x14c/0x190 fs/btrfs/inode.c:6455
touch_atime+0x2f8/0x6b0 fs/inode.c:2265
file_accessed include/linux/fs.h:2271 [inline]
btrfs_file_mmap_prepare+0x189/0x200 fs/btrfs/file.c:2051
vfs_mmap_prepare include/linux/fs.h:2083 [inline]
call_mmap_prepare mm/vma.c:2672 [inline]
__mmap_region mm/vma.c:2755 [inline]
mmap_region+0xec0/0x2280 mm/vma.c:2856
do_mmap+0xc2f/0x10c0 mm/mmap.c:560
vm_mmap_pgoff+0x2cc/0x4f0 mm/util.c:581
ksys_mmap_pgoff+0x4e8/0x720 mm/mmap.c:606
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0x15f/0xf80 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
-> #2 (&mm->mmap_lock){++++}-{4:4}:
down_read_killable+0xa4/0x220 kernel/locking/rwsem.c:1593
mmap_read_lock_killable+0x1d/0x70 include/linux/mmap_lock.h:601
get_mmap_lock_carefully mm/mmap_lock.c:450 [inline]
lock_mm_and_find_vma+0x2d7/0x340 mm/mmap_lock.c:501
do_user_addr_fault+0x330/0x1340 arch/x86/mm/fault.c:1357
handle_page_fault arch/x86/mm/fault.c:1474 [inline]
exc_page_fault+0x6a/0xc0 arch/x86/mm/fault.c:1527
asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:618
filldir64+0x2be/0x640 fs/readdir.c:370
dir_emit include/linux/fs.h:3585 [inline]
kernfs_fop_readdir+0x578/0x950 fs/kernfs/dir.c:2000
iterate_dir+0x3a5/0x580 fs/readdir.c:110
__do_sys_getdents64 fs/readdir.c:399 [inline]
__se_sys_getdents64+0xf1/0x280 fs/readdir.c:384
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0x15f/0xf80 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
-> #1 (&root->kernfs_rwsem){++++}-{4:4}:
down_write+0x3a/0x50 kernel/locking/rwsem.c:1625
kernfs_add_one+0x41/0x5c0 fs/kernfs/dir.c:826
kernfs_create_dir_ns+0xde/0x130 fs/kernfs/dir.c:1131
sysfs_create_dir_ns+0x12f/0x2a0 fs/sysfs/dir.c:59
create_dir lib/kobject.c:73 [inline]
kobject_add_internal+0x631/0xd10 lib/kobject.c:240
kobject_add_varg lib/kobject.c:374 [inline]
kobject_init_and_add+0x12b/0x1a0 lib/kobject.c:457
btrfs_sysfs_add_qgroups+0x116/0x2e0 fs/btrfs/sysfs.c:2604
btrfs_quota_enable+0x282/0x2850 fs/btrfs/qgroup.c:1034
btrfs_ioctl_quota_ctl+0x186/0x1c0 fs/btrfs/ioctl.c:3541
vfs_ioctl fs/ioctl.c:51 [inline]
__do_sys_ioctl fs/ioctl.c:597 [inline]
__se_sys_ioctl+0xff/0x170 fs/ioctl.c:583
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0x15f/0xf80 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
-> #0 (&fs_info->qgroup_ioctl_lock){+.+.}-{4:4}:
check_prev_add kernel/locking/lockdep.c:3165 [inline]
check_prevs_add kernel/locking/lockdep.c:3284 [inline]
validate_chain kernel/locking/lockdep.c:3908 [inline]
__lock_acquire+0x15a5/0x2cf0 kernel/locking/lockdep.c:5237
lock_acquire+0x106/0x350 kernel/locking/lockdep.c:5868
__mutex_lock_common kernel/locking/rtmutex_api.c:534 [inline]
mutex_lock_nested+0x5a/0x1d0 kernel/locking/rtmutex_api.c:553
btrfs_quota_enable+0x2c6/0x2850 fs/btrfs/qgroup.c:1063
btrfs_ioctl_quota_ctl+0x186/0x1c0 fs/btrfs/ioctl.c:3541
vfs_ioctl fs/ioctl.c:51 [inline]
__do_sys_ioctl fs/ioctl.c:597 [inline]
__se_sys_ioctl+0xff/0x170 fs/ioctl.c:583
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0x15f/0xf80 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
other info that might help us debug this:
Chain exists of:
&fs_info->qgroup_ioctl_lock --> btrfs_trans_num_writers --> btrfs_trans_num_extwriters
Possible unsafe locking scenario:
CPU0 CPU1
---- ----
rlock(btrfs_trans_num_extwriters);
lock(btrfs_trans_num_writers);
lock(btrfs_trans_num_extwriters);
lock(&fs_info->qgroup_ioctl_lock);
*** DEADLOCK ***
5 locks held by syz.8.953/12232:
#0: ffff88803c076480 (sb_writers#21){.+.+}-{0:0}, at: mnt_want_write_file+0x63/0x210 fs/namespace.c:537
#1: ffff8880243b11b8 (&fs_info->subvol_sem){+.+.}-{4:4}, at: btrfs_ioctl_quota_ctl+0x17b/0x1c0 fs/btrfs/ioctl.c:3540
#2: ffff88803c076770 (sb_internal#2){.+.+}-{0:0}, at: btrfs_quota_enable+0x2b9/0x2850 fs/btrfs/qgroup.c:1061
#3: ffff8880243b3110 (btrfs_trans_num_writers){++++}-{0:0}, at: join_transaction+0x154/0xd50 fs/btrfs/transaction.c:323
#4: ffff8880243b3138 (btrfs_trans_num_extwriters){++++}-{0:0}, at: join_transaction+0x154/0xd50 fs/btrfs/transaction.c:323
stack backtrace:
CPU: 0 UID: 0 PID: 12232 Comm: syz.8.953 Not tainted syzkaller #0 PREEMPT_{RT,(full)}
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/18/2026
Call Trace:
<TASK>
dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120
print_circular_bug+0x2e1/0x300 kernel/locking/lockdep.c:2043
check_noncircular+0x12e/0x150 kernel/locking/lockdep.c:2175
check_prev_add kernel/locking/lockdep.c:3165 [inline]
check_prevs_add kernel/locking/lockdep.c:3284 [inline]
validate_chain kernel/locking/lockdep.c:3908 [inline]
__lock_acquire+0x15a5/0x2cf0 kernel/locking/lockdep.c:5237
lock_acquire+0x106/0x350 kernel/locking/lockdep.c:5868
__mutex_lock_common kernel/locking/rtmutex_api.c:534 [inline]
mutex_lock_nested+0x5a/0x1d0 kernel/locking/rtmutex_api.c:553
btrfs_quota_enable+0x2c6/0x2850 fs/btrfs/qgroup.c:1063
btrfs_ioctl_quota_ctl+0x186/0x1c0 fs/btrfs/ioctl.c:3541
vfs_ioctl fs/ioctl.c:51 [inline]
__do_sys_ioctl fs/ioctl.c:597 [inline]
__se_sys_ioctl+0xff/0x170 fs/ioctl.c:583
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0x15f/0xf80 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f582be8c819
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:00007f582a0e6028 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007f582c105fa0 RCX: 00007f582be8c819
RDX: 00002000000000c0 RSI: 00000000c0109428 RDI: 0000000000000003
RBP: 00007f582bf22c91 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f582c106038 R14: 00007f582c105fa0 R15: 00007ffde7177bd8
</TASK>
BTRFS info (device loop8): setting incompat feature flag for SIMPLE_QUOTA (0x10000)
| Time | Kernel | Commit | Syzkaller | Config | Log | Report | Syz repro | C repro | VM info | Assets (help?) | Manager | Title |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2026/04/16 16:38 | upstream | 1d51b370a0f8 | 4743f87d | .config | console log | report | info | [disk image] [vmlinux] [kernel image] | ci2-upstream-fs | possible deadlock in btrfs_quota_enable | ||
| 2026/04/16 08:29 | upstream | aec2f682d47c | df15c5f3 | .config | console log | report | info | [disk image] [vmlinux] [kernel image] | ci2-upstream-fs | possible deadlock in btrfs_quota_enable | ||
| 2026/04/12 02:03 | upstream | e753c16cb3dd | 38c8e246 | .config | console log | report | info | [disk image] [vmlinux] [kernel image] | ci-upstream-kasan-gce-root | possible deadlock in btrfs_quota_enable | ||
| 2026/04/04 13:13 | upstream | 631919fb12fe | 4440e7c2 | .config | console log | report | info | [disk image] [vmlinux] [kernel image] | ci2-upstream-fs | possible deadlock in btrfs_quota_enable | ||
| 2026/04/01 17:43 | upstream | 9147566d8016 | 9a1f7828 | .config | console log | report | info | [disk image] [vmlinux] [kernel image] | ci2-upstream-fs | possible deadlock in btrfs_quota_enable | ||
| 2026/03/25 01:35 | upstream | e3c33bc767b5 | 74e70d19 | .config | console log | report | info | [disk image] [vmlinux] [kernel image] | ci2-upstream-fs | possible deadlock in btrfs_quota_enable | ||
| 2026/03/24 09:31 | upstream | c369299895a5 | baf8bf12 | .config | console log | report | info | [disk image] [vmlinux] [kernel image] | ci2-upstream-fs | possible deadlock in btrfs_quota_enable | ||
| 2026/03/23 21:39 | upstream | c369299895a5 | 4933dba2 | .config | console log | report | info | [disk image] [vmlinux] [kernel image] | ci2-upstream-fs | possible deadlock in btrfs_quota_enable | ||
| 2026/03/23 07:00 | upstream | 8d8bd2a5aa98 | 5b92003d | .config | console log | report | info | [disk image] [vmlinux] [kernel image] | ci2-upstream-fs | possible deadlock in btrfs_quota_enable | ||
| 2026/03/22 01:39 | upstream | 113ae7b4decc | 5b92003d | .config | console log | report | info | [disk image] [vmlinux] [kernel image] | ci2-upstream-fs | possible deadlock in btrfs_quota_enable | ||
| 2026/03/21 06:07 | upstream | 42bddab0563f | 5b92003d | .config | console log | report | info | [disk image] [vmlinux] [kernel image] | ci2-upstream-fs | possible deadlock in btrfs_quota_enable | ||
| 2026/03/19 22:02 | upstream | 8a30aeb0d1b4 | bd6dcb30 | .config | console log | report | info | [disk image] [vmlinux] [kernel image] | ci2-upstream-fs | possible deadlock in btrfs_quota_enable | ||
| 2026/02/23 09:21 | upstream | 6de23f81a5e0 | 6e7b5511 | .config | console log | report | info | [disk image] [vmlinux] [kernel image] | ci2-upstream-fs | possible deadlock in btrfs_quota_enable | ||
| 2026/02/21 19:15 | upstream | d79526b89571 | 6e7b5511 | .config | console log | report | info | [disk image] [vmlinux] [kernel image] | ci2-upstream-fs | possible deadlock in btrfs_quota_enable | ||
| 2026/01/18 12:45 | upstream | d12453c7e281 | 20d37d28 | .config | console log | report | info | [disk image] [vmlinux] [kernel image] | ci2-upstream-fs | possible deadlock in btrfs_quota_enable | ||
| 2025/12/09 01:35 | upstream | c2f2b01b74be | d6526ea3 | .config | console log | report | info | [disk image] [vmlinux] [kernel image] | ci2-upstream-fs | possible deadlock in btrfs_quota_enable | ||
| 2025/11/29 10:13 | upstream | 19eef1d98eed | d6526ea3 | .config | console log | report | info | [disk image] [vmlinux] [kernel image] | ci2-upstream-fs | possible deadlock in btrfs_quota_enable | ||
| 2025/11/27 06:50 | upstream | 4941a17751c9 | d6526ea3 | .config | console log | report | info | [disk image] [vmlinux] [kernel image] | ci2-upstream-fs | possible deadlock in btrfs_quota_enable | ||
| 2025/11/18 11:50 | upstream | e7c375b18160 | ef766cd7 | .config | console log | report | info | [disk image] [vmlinux] [kernel image] | ci2-upstream-fs | possible deadlock in btrfs_quota_enable | ||
| 2025/11/16 07:16 | upstream | f824272b6e3f | f7988ea4 | .config | console log | report | info | [disk image] [vmlinux] [kernel image] | ci2-upstream-fs | possible deadlock in btrfs_quota_enable | ||
| 2025/10/27 20:04 | upstream | dcb6fa37fd7b | fd2207e7 | .config | console log | report | info | [disk image] [vmlinux] [kernel image] | ci2-upstream-fs | possible deadlock in btrfs_quota_enable | ||
| 2025/10/14 07:48 | upstream | 3a8660878839 | b6605ba8 | .config | console log | report | info | [disk image] [vmlinux] [kernel image] | ci2-upstream-fs | possible deadlock in btrfs_quota_enable | ||
| 2025/08/31 10:00 | upstream | c8bc81a52d5a | 807a3b61 | .config | console log | report | info | [disk image] [vmlinux] [kernel image] | ci2-upstream-fs | possible deadlock in btrfs_quota_enable | ||
| 2025/08/26 02:15 | upstream | b6add54ba618 | bf27483f | .config | console log | report | info | [disk image] [vmlinux] [kernel image] | ci-upstream-kasan-gce-root | possible deadlock in btrfs_quota_enable | ||
| 2025/07/24 07:21 | upstream | 01a412d06bc5 | 0c1d6ded | .config | console log | report | info | [disk image] [vmlinux] [kernel image] | ci2-upstream-fs | possible deadlock in btrfs_quota_enable | ||
| 2025/07/07 18:04 | upstream | d7b8f8e20813 | 4f67c4ae | .config | console log | report | info | [disk image] [vmlinux] [kernel image] | ci2-upstream-fs | possible deadlock in btrfs_quota_enable | ||
| 2025/07/07 06:18 | upstream | d7b8f8e20813 | 4f67c4ae | .config | console log | report | info | [disk image] [vmlinux] [kernel image] | ci2-upstream-fs | possible deadlock in btrfs_quota_enable | ||
| 2025/06/11 08:56 | upstream | aef17cb3d3c4 | 5d7e17ca | .config | console log | report | info | [disk image] [vmlinux] [kernel image] | ci2-upstream-fs | possible deadlock in btrfs_quota_enable | ||
| 2025/06/10 01:47 | upstream | 19272b37aa4f | 4826c28e | .config | console log | report | info | [disk image] [vmlinux] [kernel image] | ci2-upstream-fs | possible deadlock in btrfs_quota_enable | ||
| 2025/05/25 04:36 | upstream | b1427432d3b6 | ed351ea7 | .config | console log | report | info | [disk image] [vmlinux] [kernel image] | ci2-upstream-fs | possible deadlock in btrfs_quota_enable | ||
| 2025/05/15 04:44 | upstream | c94d59a126cb | d6b2ee52 | .config | console log | report | info | [disk image] [vmlinux] [kernel image] | ci2-upstream-fs | possible deadlock in btrfs_quota_enable | ||
| 2025/05/06 20:39 | upstream | 0d8d44db295c | 350f4ffc | .config | console log | report | info | [disk image] [vmlinux] [kernel image] | ci2-upstream-fs | possible deadlock in btrfs_quota_enable | ||
| 2026/02/20 23:41 | linux-next | d4906ae14a5f | 741f5161 | .config | console log | report | info | [disk image] [vmlinux] [kernel image] | ci-upstream-linux-next-kasan-gce-root | possible deadlock in btrfs_quota_enable | ||
| 2025/12/25 10:39 | linux-next | cc3aa43b44bd | d6526ea3 | .config | console log | report | info | [disk image] [vmlinux] [kernel image] | ci-upstream-linux-next-kasan-gce-root | possible deadlock in btrfs_quota_enable | ||
| 2025/07/19 23:46 | linux-next | d086c886ceb9 | 7117feec | .config | console log | report | info | [disk image] [vmlinux] [kernel image] | ci-upstream-linux-next-kasan-gce-root | possible deadlock in btrfs_quota_enable | ||
| 2025/12/23 12:11 | git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci | 8f0b4cce4481 | d6526ea3 | .config | console log | report | info | [disk image] [vmlinux] [kernel image] | ci-upstream-gce-arm64 | possible deadlock in btrfs_quota_enable | ||
| 2025/12/16 15:26 | git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci | 8f0b4cce4481 | d6526ea3 | .config | console log | report | info | [disk image] [vmlinux] [kernel image] | ci-upstream-gce-arm64 | possible deadlock in btrfs_quota_enable | ||
| 2025/11/20 09:58 | git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci | ef10811e9f56 | 26ee5237 | .config | console log | report | info | [disk image] [vmlinux] [kernel image] | ci-upstream-gce-arm64 | possible deadlock in btrfs_quota_enable | ||
| 2025/10/28 16:04 | git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci | b98c94eed4a9 | fd2207e7 | .config | console log | report | info | [disk image] [vmlinux] [kernel image] | ci-upstream-gce-arm64 | possible deadlock in btrfs_quota_enable | ||
| 2025/10/25 23:46 | git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci | b98c94eed4a9 | c0460fcd | .config | console log | report | info | [disk image] [vmlinux] [kernel image] | ci-upstream-gce-arm64 | possible deadlock in btrfs_quota_enable | ||
| 2025/09/13 18:06 | git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci | 8736259279a3 | e2beed91 | .config | console log | report | info | [disk image] [vmlinux] [kernel image] | ci-upstream-gce-arm64 | possible deadlock in btrfs_quota_enable | ||
| 2025/09/08 12:43 | git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci | b320789d6883 | d291dd2d | .config | console log | report | info | [disk image] [vmlinux] [kernel image] | ci-upstream-gce-arm64 | possible deadlock in btrfs_quota_enable | ||
| 2025/08/11 11:43 | git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci | 82af5ea7c611 | 32a0e5ed | .config | console log | report | info | [disk image] [vmlinux] [kernel image] | ci-upstream-gce-arm64 | possible deadlock in btrfs_quota_enable | ||
| 2025/08/09 09:18 | git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci | 82af5ea7c611 | 32a0e5ed | .config | console log | report | info | [disk image] [vmlinux] [kernel image] | ci-upstream-gce-arm64 | possible deadlock in btrfs_quota_enable | ||
| 2025/07/14 09:33 | git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci | ec4801305969 | 3cda49cf | .config | console log | report | info | [disk image] [vmlinux] [kernel image] | ci-upstream-gce-arm64 | possible deadlock in btrfs_quota_enable |