bcachefs (loop3): journal_replay... done
bcachefs (loop3): resume_logged_ops... done
bcachefs (loop3): reading quotas
=============================
WARNING: suspicious RCU usage
6.9.0-rc7-syzkaller-gfda5695d692c #0 Not tainted
-----------------------------
fs/bcachefs/snapshot.h:45 suspicious rcu_dereference_check() usage!

other info that might help us debug this:


rcu_scheduler_active = 2, debug_locks = 1
4 locks held by syz-executor.3/7374:
 #0: ffff0000fac80278 (&c->state_lock){+.+.}-{3:3}, at: bch2_fs_start+0x50/0x53c fs/bcachefs/super.c:1013
 #1: ffff0000fac84250 (&c->btree_trans_barrier){.+.+}-{0:0}, at: srcu_lock_acquire+0x18/0x54 include/linux/srcu.h:115
 #2: ffff0000c2d3f070 (&dev->mutex){....}-{3:3}, at: six_trylock_type+0x1c/0x4c fs/bcachefs/six.h:206
 #3: ffff0000d93f6070 (&dev->mutex){....}-{3:3}, at: six_trylock_type+0x1c/0x4c fs/bcachefs/six.h:206

stack backtrace:
CPU: 1 PID: 7374 Comm: syz-executor.3 Not tainted 6.9.0-rc7-syzkaller-gfda5695d692c #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/02/2024
Call trace:
 dump_backtrace+0x1b8/0x1e4 arch/arm64/kernel/stacktrace.c:317
 show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:324
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0xe4/0x150 lib/dump_stack.c:114
 dump_stack+0x1c/0x28 lib/dump_stack.c:123
 lockdep_rcu_suspicious+0x260/0x464 kernel/locking/lockdep.c:6712
 snapshot_t fs/bcachefs/snapshot.h:45 [inline]
 bch2_fs_quota_read_inode fs/bcachefs/quota.c:567 [inline]
 bch2_fs_quota_read+0xf64/0x1840 fs/bcachefs/quota.c:613
 bch2_fs_recovery+0x340c/0x4854 fs/bcachefs/recovery.c:828
 bch2_fs_start+0x30c/0x53c fs/bcachefs/super.c:1043
 bch2_fs_open+0x8b4/0xb64 fs/bcachefs/super.c:2102
 bch2_mount+0x558/0xe10 fs/bcachefs/fs.c:1903
 legacy_get_tree+0xd4/0x16c fs/fs_context.c:662
 vfs_get_tree+0x90/0x288 fs/super.c:1779
 do_new_mount+0x278/0x900 fs/namespace.c:3352
 path_mount+0x590/0xe04 fs/namespace.c:3679
 do_mount fs/namespace.c:3692 [inline]
 __do_sys_mount fs/namespace.c:3898 [inline]
 __se_sys_mount fs/namespace.c:3875 [inline]
 __arm64_sys_mount+0x45c/0x594 fs/namespace.c:3875
 __invoke_syscall arch/arm64/kernel/syscall.c:34 [inline]
 invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:48
 el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:133
 do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:152
 el0_svc+0x54/0x168 arch/arm64/kernel/entry-common.c:712
 el0t_64_sync_handler+0x84/0xfc arch/arm64/kernel/entry-common.c:730
 el0t_64_sync+0x190/0x194 arch/arm64/kernel/entry.S:598
bcachefs (loop3): bch2_fs_quota_read_inode: snapshot tree 0 not found
bcachefs (loop3): inconsistency detected - emergency read only at journal seq 10
bcachefs (loop3): bch2_fs_quota_read(): error ENOENT_snapshot_tree
bcachefs (loop3): bch2_fs_recovery(): error ENOENT_snapshot_tree
bcachefs (loop3): bch2_fs_start(): error starting filesystem ENOENT_snapshot_tree
bcachefs (loop3): shutting down
bcachefs (loop3): shutdown complete