syzbot


WARNING: suspicious RCU usage in btrfs_dev_stat_inc_and_print

Status: closed as invalid on 2026/03/03 16:19
Subsystems: btrfs
[Documentation on labels]
Reported-by: syzbot+2c45a55710ac9b888efc@syzkaller.appspotmail.com
First crash: 17d, last: 17d
Discussions (1)
Title Replies (including bot) Last reply
[syzbot] [btrfs?] WARNING: suspicious RCU usage in btrfs_dev_stat_inc_and_print 1 (2) 2026/03/03 16:18

Sample crash report:
loop0: detected capacity change from 32768 to 0
=============================
WARNING: suspicious RCU usage
syzkaller #0 Not tainted
-----------------------------
fs/btrfs/volumes.h:872 suspicious rcu_dereference_check() usage!

other info that might help us debug this:


rcu_scheduler_active = 2, debug_locks = 1
6 locks held by syz.0.680/8076:
 #0: ffff888078859278 (&f->f_pos_lock){+.+.}-{4:4}, at: fdget_pos+0x246/0x320 fs/file.c:1261
 #1: ffff888034360420 (sb_writers#24){.+.+}-{0:0}, at: file_start_write include/linux/fs.h:2710 [inline]
 #1: ffff888034360420 (sb_writers#24){.+.+}-{0:0}, at: vfs_write+0x227/0xb90 fs/read_write.c:684
 #2: ffff888034360610 (sb_internal#4){.+.+}-{0:0}, at: btrfs_sync_file+0xcaa/0x1230 fs/btrfs/file.c:1724
 #3: ffff88805386a6f8 (btrfs_trans_num_writers){++++}-{0:0}, at: join_transaction+0x41b/0xd60 fs/btrfs/transaction.c:298
 #4: ffff88805386a720 (btrfs_trans_num_extwriters){++++}-{0:0}, at: join_transaction+0x41b/0xd60 fs/btrfs/transaction.c:298
 #5: ffff888034a383a8 (&root->log_mutex){+.+.}-{4:4}, at: btrfs_sync_log+0x21a/0x28a0 fs/btrfs/tree-log.c:3335

stack backtrace:
CPU: 0 UID: 0 PID: 8076 Comm: syz.0.680 Not tainted syzkaller #0 PREEMPT(full) 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2026
Call Trace:
 <TASK>
 dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120
 lockdep_rcu_suspicious+0x13f/0x1d0 kernel/locking/lockdep.c:6876
 btrfs_dev_name fs/btrfs/volumes.h:872 [inline]
 btrfs_dev_stat_inc_and_print+0x328/0x400 fs/btrfs/volumes.c:8282
 btrfs_log_dev_io_error fs/btrfs/bio.c:-1 [inline]
 btrfs_simple_end_io+0x1e6/0x3e0 fs/btrfs/bio.c:399
 btrfs_submit_chunk fs/btrfs/bio.c:848 [inline]
 btrfs_submit_bbio+0x1316/0x1ea0 fs/btrfs/bio.c:906
 btree_writepages+0xb68/0x1260 fs/btrfs/extent_io.c:2390
 do_writepages+0x32e/0x550 mm/page-writeback.c:2554
 filemap_writeback mm/filemap.c:387 [inline]
 filemap_fdatawrite_range+0x1ef/0x2f0 mm/filemap.c:412
 btrfs_write_marked_extents+0x1ac/0x300 fs/btrfs/transaction.c:1174
 btrfs_sync_log+0x9bd/0x28a0 fs/btrfs/tree-log.c:3386
 btrfs_sync_file+0xdaf/0x1230 fs/btrfs/file.c:1769
 generic_write_sync include/linux/fs.h:2640 [inline]
 btrfs_do_write_iter+0x72e/0x880 fs/btrfs/file.c:1468
 new_sync_write fs/read_write.c:595 [inline]
 vfs_write+0x61d/0xb90 fs/read_write.c:688
 ksys_write+0x150/0x270 fs/read_write.c:740
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0x14d/0xf80 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f6c42f9c799
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:00007f6c43e09028 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 00007f6c43215fa0 RCX: 00007f6c42f9c799
RDX: 000000000000fea7 RSI: 0000200000000200 RDI: 0000000000000005
RBP: 00007f6c43032bd9 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f6c43216038 R14: 00007f6c43215fa0 R15: 00007fffadae2ee8
 </TASK>
BTRFS error (device loop0): bdev /dev/loop0 errs: wr 1, rd 0, flush 0, corrupt 0, gen 0
BTRFS error (device loop0): bdev /dev/loop0 errs: wr 2, rd 0, flush 0, corrupt 0, gen 0
BTRFS error (device loop0 state A): Transaction aborted (error -5)
BTRFS: error (device loop0 state A) in __btrfs_run_delayed_items:1162: errno=-5 IO failure
BTRFS info (device loop0 state EA): forced readonly
BTRFS warning (device loop0 state EA): Skipping commit of aborted transaction.
BTRFS: error (device loop0 state EA) in cleanup_transaction:2042: errno=-5 IO failure

Crashes (6):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/02/27 10:59 linux-next 7d6661873f6b a2f13f71 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING: suspicious RCU usage in btrfs_dev_stat_inc_and_print
2026/02/27 01:25 linux-next 7d6661873f6b ffa54287 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING: suspicious RCU usage in btrfs_dev_stat_inc_and_print
2026/02/27 01:25 linux-next 7d6661873f6b ffa54287 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING: suspicious RCU usage in btrfs_dev_stat_inc_and_print
2026/02/27 00:47 linux-next 7d6661873f6b ffa54287 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING: suspicious RCU usage in btrfs_dev_stat_inc_and_print
2026/02/26 20:53 linux-next 7d6661873f6b ffa54287 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING: suspicious RCU usage in btrfs_dev_stat_inc_and_print
2026/02/26 20:53 linux-next 7d6661873f6b ffa54287 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING: suspicious RCU usage in btrfs_dev_stat_inc_and_print
* Struck through repros no longer work on HEAD.