, fixing done bcachefs (loop0): check_lrus... done bcachefs (loop0): check_btree_backpointers... done bcachefs (loop0): check_backpointers_to_extents... done bcachefs (loop0): check_extents_to_backpointers... missing backpointer for btree=extents l=1 u64s 11 type btree_ptr_v2 SPOS_MAX len 0 ver 0: seq c6c25c03258c59c5 written 16 min_key POS_MIN durability: 1 ptr: 0:27:0 gen 0 got: u64s 5 type deleted 0:7077888:0 len 0 ver 0 want: u64s 9 type backpointer 0:7077888:0 len 0 ver 0: bucket=0:27:0 btree=extents l=1 offset=0:0 len=256 pos=SPOS_MAX, fixing missing backpointer for btree=extents l=0 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 got: u64s 5 type deleted 0:8912896:0 len 0 ver 0 want: u64s 9 type backpointer 0:8912896:0 len 0 ver 0: bucket=0:34:0 btree=extents l=0 offset=0:0 len=8 pos=4099:8:U32_MAX, fixing missing backpointer for btree=extents l=0 u64s 7 type extent 536870913:24:U32_MAX len 24 ver 0: durability: 1 crc: c_size 8 size 24 offset 0 nonce 0 csum none 0:0 compress lz4 ptr: 0:34:8 gen 0 got: u64s 5 type deleted 0:8921088:0 len 0 ver 0 want: u64s 9 type backpointer 0:8921088:0 len 0 ver 0: bucket=0:34:0 btree=extents l=0 offset=8:0 len=8 pos=536870913:24:U32_MAX, fixing missing backpointer for btree=inodes l=1 u64s 11 type btree_ptr_v2 SPOS_MAX len 0 ver 0: seq 7589ab5e0c11cc7a written 24 min_key POS_MIN durability: 1 ptr: 0:38:0 gen 0 got: u64s 5 type deleted 0:9961472:0 len 0 ver 0 want: u64s 9 type backpointer 0:9961472:0 len 0 ver 0: bucket=0:38:0 btree=inodes l=1 offset=0:0 len=256 pos=SPOS_MAX, fixing missing backpointer for btree=dirents l=1 u64s 11 type btree_ptr_v2 SPOS_MAX len 0 ver 0: seq 9aa2895aefce4bdf written 24 min_key POS_MIN durability: 1 ptr: 0:41:0 gen 0 got: u64s 5 type deleted 0:10747904:0 len 0 ver 0 want: u64s 9 type backpointer 0:10747904:0 len 0 ver 0: bucket=0:41:0 btree=dirents l=1 offset=0:0 len=256 pos=SPOS_MAX, fixing missing backpointer for btree=xattrs l=1 u64s 11 type btree_ptr_v2 SPOS_MAX len 0 ver 0: seq 2285c34bed0abe32 written 16 min_key POS_MIN durability: 1 ptr: 0:31:0 gen 0 got: u64s 5 type deleted 0:8126464:0 len 0 ver 0 want: u64s 9 type backpointer 0:8126464:0 len 0 ver 0: bucket=0:31:0 btree=xattrs l=1 offset=0:0 len=256 pos=SPOS_MAX, fixing missing backpointer for btree=alloc l=1 u64s 11 type btree_ptr_v2 SPOS_MAX len 0 ver 0: seq ac62141f8dc7e261 written 40 min_key POS_MIN durability: 1 ptr: 0:26:0 gen 0 got: u64s 5 type deleted 0:6815744:0 len 0 ver 0 want: u64s 9 type backpointer 0:6815744:0 len 0 ver 0: bucket=0:26:0 btree=alloc l=1 offset=0:0 len=256 pos=SPOS_MAX, fixing missing backpointer for btree=subvolumes l=1 u64s 11 type btree_ptr_v2 SPOS_MAX len 0 ver 0: seq c0bef60d07ceb940 written 16 min_key POS_MIN durability: 1 ptr: 0:35:0 gen 0 got: u64s 5 type deleted 0:9175040:0 len 0 ver 0 want: u64s 9 type backpointer 0:9175040:0 len 0 ver 0: bucket=0:35:0 btree=subvolumes l=1 offset=0:0 len=256 pos=SPOS_MAX, fixing missing backpointer for btree=snapshots l=1 u64s 11 type btree_ptr_v2 SPOS_MAX len 0 ver 0: seq ebb8d5a9e3463bdb written 16 min_key POS_MIN durability: 1 ptr: 0:32:0 gen 0 got: u64s 5 type deleted 0:8388608:0 len 0 ver 0 want: u64s 9 type backpointer 0:8388608:0 len 0 ver 0: bucket=0:32:0 btree=snapshots l=1 offset=0:0 len=256 pos=SPOS_MAX, fixing missing backpointer for btree=lru l=1 u64s 11 type btree_ptr_v2 SPOS_MAX len 0 ver 0: seq 28f61e078e70b95c written 16 min_key POS_MIN durability: 1 ptr: 0:28:0 gen 0 got: u64s 5 type deleted 0:7340032:0 len 0 ver 0 want: u64s 9 type backpointer 0:7340032:0 len 0 ver 0: bucket=0:28:0 btree=lru l=1 offset=0:0 len=256 pos=SPOS_MAX, fixing missing backpointer for btree=freespace l=1 u64s 11 type btree_ptr_v2 SPOS_MAX len 0 ver 0: seq e81e1ed936acf3df written 56 min_key POS_MIN durability: 1 ptr: 0:29:0 gen 0 got: u64s 5 type deleted 0:7602176:0 len 0 ver 0 want: u64s 9 type backpointer 0:7602176:0 len 0 ver 0: bucket=0:29:0 btree=freespace l=1 offset=0:0 len=256 pos=SPOS_MAX, fixing missing backpointer for btree=deleted_inodes l=1 u64s 11 type btree_ptr_v2 SPOS_MAX len 0 ver 0: seq 1db8f60c84bb244c written 8 min_key POS_MIN durability: 1 ptr: 0:42:0 gen 0 got: u64s 5 type deleted 0:11010048:0 len 0 ver 0 want: u64s 9 type backpointer 0:11010048:0 len 0 ver 0: bucket=0:42:0 btree=deleted_inodes l=1 offset=0:0 len=256 pos=SPOS_MAX, fixing done bcachefs (loop0): check_alloc_to_lru_refs... done bcachefs (loop0): bucket_gens_init... done bcachefs (loop0): check_snapshot_trees... done bcachefs (loop0): check_snapshots... snapshot points to missing/incorrect tree: u64s 8 type snapshot 0:4294967295:0 len 0 ver 0: is_subvol 1 deleted 0 parent 0 children 0 0 subvol 1 tree 0, fixing ============================= WARNING: suspicious RCU usage 6.11.0-syzkaller-08833-gde5cb0dcb74c #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 3 locks held by syz.0.0/5102: #0: ffff88804c100278 (&c->state_lock){+.+.}-{3:3}, at: bch2_fs_start+0x45/0x5b0 fs/bcachefs/super.c:1006 #1: ffff88804c1042c0 (&c->btree_trans_barrier){.+.+}-{0:0}, at: srcu_lock_acquire include/linux/srcu.h:151 [inline] #1: ffff88804c1042c0 (&c->btree_trans_barrier){.+.+}-{0:0}, at: srcu_read_lock include/linux/srcu.h:250 [inline] #1: ffff88804c1042c0 (&c->btree_trans_barrier){.+.+}-{0:0}, at: __bch2_trans_get+0x7de/0xd20 fs/bcachefs/btree_iter.c:3200 #2: ffff88804e39c128 (bcachefs_btree){+.+.}-{0:0}, at: srcu_lock_acquire include/linux/srcu.h:151 [inline] #2: ffff88804e39c128 (bcachefs_btree){+.+.}-{0:0}, at: srcu_read_lock include/linux/srcu.h:250 [inline] #2: ffff88804e39c128 (bcachefs_btree){+.+.}-{0:0}, at: __bch2_trans_get+0x7de/0xd20 fs/bcachefs/btree_iter.c:3200 stack backtrace: CPU: 0 UID: 0 PID: 5102 Comm: syz.0.0 Not tainted 6.11.0-syzkaller-08833-gde5cb0dcb74c #0 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 Call Trace: __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:6802 snapshot_t fs/bcachefs/snapshot.h:45 [inline] bch2_snapshot_tree_oldest_subvol+0x485/0x550 fs/bcachefs/snapshot.c:473 snapshot_tree_ptr_repair fs/bcachefs/snapshot.c:714 [inline] check_snapshot fs/bcachefs/snapshot.c:836 [inline] bch2_check_snapshots+0x3f59/0x5320 fs/bcachefs/snapshot.c:889 bch2_run_recovery_pass+0xf0/0x1e0 fs/bcachefs/recovery_passes.c:183 bch2_run_recovery_passes+0x19e/0x820 fs/bcachefs/recovery_passes.c:230 bch2_fs_recovery+0x24f9/0x38b0 fs/bcachefs/recovery.c:859 bch2_fs_start+0x356/0x5b0 fs/bcachefs/super.c:1036 bch2_fs_get_tree+0xd61/0x1700 fs/bcachefs/fs.c:1956 vfs_get_tree+0x90/0x2b0 fs/super.c:1800 do_new_mount+0x2be/0xb40 fs/namespace.c:3507 do_mount fs/namespace.c:3847 [inline] __do_sys_mount fs/namespace.c:4055 [inline] __se_sys_mount+0x2d6/0x3c0 fs/namespace.c:4032 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fab37b7f69a Code: d8 64 89 02 48 c7 c0 ff ff ff ff eb a6 e8 de 1a 00 00 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 49 89 ca b8 a5 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 a8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fab389dee68 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 00007fab389deef0 RCX: 00007fab37b7f69a RDX: 0000000020000240 RSI: 0000000020000140 RDI: 00007fab389deeb0 RBP: 0000000020000240 R08: 00007fab389deef0 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000020000140 R13: 00007fab389deeb0 R14: 00000000000058b9 R15: 00000000200001c0 snapshot points to missing/incorrect tree: u64s 8 type snapshot 0:4294967295:0 len 0 ver 0: is_subvol 1 deleted 0 parent 0 children 0 0 subvol 1 tree 0, fixing done bcachefs (loop0): check_subvols... done bcachefs (loop0): check_subvol_children... done bcachefs (loop0): delete_dead_snapshots... done bcachefs (loop0): check_inodes... done bcachefs (loop0): check_extents... done bcachefs (loop0): check_indirect_extents... done bcachefs (loop0): check_dirents... done bcachefs (loop0): check_xattrs... done bcachefs (loop0): check_root... done bcachefs (loop0): check_subvolume_structure... done bcachefs (loop0): check_directory_structure... done bcachefs (loop0): check_nlinks... done bcachefs (loop0): resume_logged_ops... done bcachefs (loop0): delete_dead_inodes... done bcachefs (loop0): set_fs_needs_rebalance... done bcachefs (loop0): done starting filesystem