loop0: detected capacity change from 0 to 32768 bcachefs (loop0): starting version 1.7: mi_btree_bitmap opts=metadata_checksum=none,data_checksum=none,nojournal_transaction_names bcachefs (loop0): recovering from clean shutdown, journal seq 8 bcachefs (loop0): Version upgrade required: Version upgrade from 0.19: freespace to 1.7: mi_btree_bitmap incomplete Doing incompatible version upgrade from 0.19: freespace to 1.12: rebalance_work_acct_fix running recovery passes: check_allocations,check_alloc_info,check_lrus,check_btree_backpointers,check_backpointers_to_extents,check_extents_to_backpointers,check_alloc_to_lru_refs,bucket_gens_init,check_snapshot_trees,check_snapshots,check_subvols,check_subvol_children,delete_dead_snapshots,check_inodes,check_extents,check_indirect_extents,check_dirents,check_xattrs,check_root,check_subvolume_structure,check_directory_structure,check_nlinks,set_fs_needs_rebalance bcachefs (loop0): insufficient writeable journal devices available: have 0, need 1 rw journal devs: loop0 bcachefs (loop0): accounting_read... done bcachefs (loop0): alloc_read... Oops: general protection fault, probably for non-canonical address 0xdffffc0000000000: 0000 [#1] PREEMPT SMP KASAN NOPTI KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007] CPU: 0 UID: 0 PID: 5107 Comm: syz.0.0 Not tainted 6.12.0-rc1-syzkaller-00042-gf23aa4c0761a #0 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 RIP: 0010:bch2_alloc_read+0x1841/0x25e0 fs/bcachefs/alloc_background.c:626 Code: 04 00 00 4c 89 f8 48 c1 e8 03 42 0f b6 04 20 84 c0 0f 85 52 04 00 00 48 8b 33 48 8b 3c 24 e8 e6 14 00 00 48 89 c3 48 c1 e8 03 <42> 0f b6 04 20 84 c0 0f 85 52 04 00 00 0f b6 44 24 38 88 03 48 8b RSP: 0018:ffffc90002e3f0a0 EFLAGS: 00010246 RAX: 0000000000000000 RBX: 0000000000000000 RCX: ffff88801f9dd0a8 RDX: ffffc9000b54a000 RSI: 0000000000000080 RDI: 0000000000000080 RBP: ffffc90002e3f488 R08: ffffffff840b474e R09: 0000000000000000 R10: ffffc90002e3f410 R11: fffff520005c7e84 R12: dffffc0000000000 R13: 0000000000000009 R14: ffffc90002e3f1c0 R15: ffffc90002e3f39f FS: 00007f84bce636c0(0000) GS:ffff88801fc00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007ffe070b6d28 CR3: 000000003adfc000 CR4: 0000000000352ef0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: bch2_run_recovery_pass+0xf0/0x1e0 fs/bcachefs/recovery_passes.c:185 bch2_run_recovery_passes+0x387/0x870 fs/bcachefs/recovery_passes.c:232 bch2_fs_recovery+0x25cc/0x39c0 fs/bcachefs/recovery.c:861 bch2_fs_start+0x356/0x5b0 fs/bcachefs/super.c:1037 bch2_fs_get_tree+0xd68/0x1710 fs/bcachefs/fs.c:2071 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:0x7f84bbf7f79a 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:00007f84bce62e68 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 00007f84bce62ef0 RCX: 00007f84bbf7f79a RDX: 0000000020000040 RSI: 0000000020005b40 RDI: 00007f84bce62eb0 RBP: 0000000020000040 R08: 00007f84bce62ef0 R09: 0000000000008000 R10: 0000000000008000 R11: 0000000000000246 R12: 0000000020005b40 R13: 00007f84bce62eb0 R14: 0000000000005bfa R15: 0000000020000080 Modules linked in: ---[ end trace 0000000000000000 ]--- RIP: 0010:bch2_alloc_read+0x1841/0x25e0 fs/bcachefs/alloc_background.c:626 Code: 04 00 00 4c 89 f8 48 c1 e8 03 42 0f b6 04 20 84 c0 0f 85 52 04 00 00 48 8b 33 48 8b 3c 24 e8 e6 14 00 00 48 89 c3 48 c1 e8 03 <42> 0f b6 04 20 84 c0 0f 85 52 04 00 00 0f b6 44 24 38 88 03 48 8b RSP: 0018:ffffc90002e3f0a0 EFLAGS: 00010246 RAX: 0000000000000000 RBX: 0000000000000000 RCX: ffff88801f9dd0a8 RDX: ffffc9000b54a000 RSI: 0000000000000080 RDI: 0000000000000080 RBP: ffffc90002e3f488 R08: ffffffff840b474e R09: 0000000000000000 R10: ffffc90002e3f410 R11: fffff520005c7e84 R12: dffffc0000000000 R13: 0000000000000009 R14: ffffc90002e3f1c0 R15: ffffc90002e3f39f FS: 00007f84bce636c0(0000) GS:ffff88801fc00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00005617a1db7088 CR3: 000000003adfc000 CR4: 0000000000352ef0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 ---------------- Code disassembly (best guess): 0: 04 00 add $0x0,%al 2: 00 4c 89 f8 add %cl,-0x8(%rcx,%rcx,4) 6: 48 c1 e8 03 shr $0x3,%rax a: 42 0f b6 04 20 movzbl (%rax,%r12,1),%eax f: 84 c0 test %al,%al 11: 0f 85 52 04 00 00 jne 0x469 17: 48 8b 33 mov (%rbx),%rsi 1a: 48 8b 3c 24 mov (%rsp),%rdi 1e: e8 e6 14 00 00 call 0x1509 23: 48 89 c3 mov %rax,%rbx 26: 48 c1 e8 03 shr $0x3,%rax * 2a: 42 0f b6 04 20 movzbl (%rax,%r12,1),%eax <-- trapping instruction 2f: 84 c0 test %al,%al 31: 0f 85 52 04 00 00 jne 0x489 37: 0f b6 44 24 38 movzbl 0x38(%rsp),%eax 3c: 88 03 mov %al,(%rbx) 3e: 48 rex.W 3f: 8b .byte 0x8b