=============================
WARNING: suspicious RCU usage
6.12.0-rc6-syzkaller-00077-g2e1b3cc9d7f7 #0 Not tainted
-----------------------------
fs/bcachefs/buckets.h:94 suspicious rcu_dereference_check() usage!
other info that might help us debug this:
rcu_scheduler_active = 2, debug_locks = 1
4 locks held by kworker/u4:6/1027:
#0: ffff88801ac79148 ((wq_completion)events_unbound){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3204 [inline]
#0: ffff88801ac79148 ((wq_completion)events_unbound){+.+.}-{0:0}, at: process_scheduled_works+0x93b/0x1850 kernel/workqueue.c:3310
#1: ffffc9000232fd00 ((work_completion)(&rbio->work)){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3205 [inline]
#1: ffffc9000232fd00 ((work_completion)(&rbio->work)){+.+.}-{0:0}, at: process_scheduled_works+0x976/0x1850 kernel/workqueue.c:3310
#2: ffff888050384398 (&c->btree_trans_barrier){.+.+}-{0:0}, at: srcu_lock_acquire include/linux/srcu.h:151 [inline]
#2: ffff888050384398 (&c->btree_trans_barrier){.+.+}-{0:0}, at: srcu_read_lock include/linux/srcu.h:250 [inline]
#2: ffff888050384398 (&c->btree_trans_barrier){.+.+}-{0:0}, at: __bch2_trans_get+0x7de/0xd20 fs/bcachefs/btree_iter.c:3228
#3: ffff888050368128 (bcachefs_btree){+.+.}-{0:0}, at: trans_set_locked fs/bcachefs/btree_locking.h:194 [inline]
#3: ffff888050368128 (bcachefs_btree){+.+.}-{0:0}, at: bch2_trans_begin+0x9b0/0x1c00 fs/bcachefs/btree_iter.c:3125
stack backtrace:
CPU: 0 UID: 0 PID: 1027 Comm: kworker/u4:6 Not tainted 6.12.0-rc6-syzkaller-00077-g2e1b3cc9d7f7 #0
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014
Workqueue: events_unbound bch2_rbio_retry
Call Trace:
<TASK>
__dump_stack lib/dump_stack.c:94 [inline]
dump_stack_lvl+0x241/0x360 lib/dump_stack.c:120
lockdep_rcu_suspicious+0x226/0x340 kernel/locking/lockdep.c:6821
bucket_gens fs/bcachefs/buckets.h:90 [inline]
bucket_gen+0x200/0x220 fs/bcachefs/buckets.h:99
read_from_stale_dirty_pointer+0x513/0xca0 fs/bcachefs/io_read.c:805
__bch2_read_extent+0x994/0x4880 fs/bcachefs/io_read.c:896
__bch2_read+0x1094/0x1f70 fs/bcachefs/io_read.c:1212
bch2_rbio_retry+0x3bd/0x1340 fs/bcachefs/io_read.c:478
process_one_work kernel/workqueue.c:3229 [inline]
process_scheduled_works+0xa63/0x1850 kernel/workqueue.c:3310
worker_thread+0x870/0xd30 kernel/workqueue.c:3391
kthread+0x2f0/0x390 kernel/kthread.c:389
ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:147
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244
</TASK>
bcachefs (loop0): Attempting to read from stale dirty pointer:
u64s 7 type extent 4099:8:U32_MAX len 8 ver 0: durability: 1 crc: c_size 8 size 8 offset 0 nonce 0 csum none 0:0 compress incompressible ptr: 0:34:0 gen 0 stale
memory gen: 1
u64s 13 type alloc_v4 0:34:0 len 0 ver 0:
gen 1 oldest_gen 0 data_type free
journal_seq 0
need_discard 0
need_inc_gen 0
dirty_sectors 0
stripe_sectors 0
cached_sectors 0
stripe 0
stripe_redundancy 0
io_time[READ] 1
io_time[WRITE] 1280
fragmentation 0
bp_start 8
bcachefs (loop0 inum 4099 offset 0): no device to read from: no_device_to_read_from
u64s 7 type extent 4099:8:U32_MAX len 8 ver 0: durability: 1 crc: c_size 8 size 8 offset 0 nonce 0 csum none 0:0 compress incompressible ptr: 0:34:0 gen 0 stale
bcachefs (loop0 inum 4099 offset 0): read error 3 from btree lookup