------------[ cut here ]------------ WARNING: CPU: 1 PID: 6019 at fs/bcachefs/super.c:1240 bch2_dev_free+0x222/0x290 fs/bcachefs/super.c:1240 Modules linked in: CPU: 1 UID: 0 PID: 6019 Comm: syz.4.23 Not tainted 6.15.0-rc4-syzkaller-00021-gca91b9500108 #0 PREEMPT(full) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/19/2025 RIP: 0010:bch2_dev_free+0x222/0x290 fs/bcachefs/super.c:1240 Code: 08 e8 02 f6 6c 00 4c 89 ef e8 fa f5 6c 00 48 89 df 48 83 c4 10 5b 41 5c 41 5d 41 5e 41 5f 5d e9 74 73 01 07 e8 df 26 75 fd 90 <0f> 0b 90 e9 11 fe ff ff e8 d1 26 75 fd 90 0f 0b 90 e9 18 fe ff ff RSP: 0018:ffffc9000435f360 EFLAGS: 00010287 RAX: ffffffff844a97f1 RBX: ffff888027864000 RCX: 0000000000080000 RDX: ffffc9000d369000 RSI: 0000000000029d95 RDI: 0000000000029d96 RBP: 00000000fffffff4 R08: ffffc9000435f207 R09: ffffc9000435f1e0 R10: dffffc0000000000 R11: fffff5200086be41 R12: ffff888051800000 R13: ffff8880278640b0 R14: dffffc0000000000 R15: ffff888027864040 FS: 00007f84550c96c0(0000) GS:ffff8881261cc000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000020000001c000 CR3: 00000000333fb000 CR4: 0000000000350ef0 Call Trace: __bch2_dev_alloc+0x832/0xb50 fs/bcachefs/super.c:1409 bch2_dev_alloc+0xcb/0x170 fs/bcachefs/super.c:1435 bch2_fs_alloc fs/bcachefs/super.c:947 [inline] bch2_fs_open+0x26ee/0x27e0 fs/bcachefs/super.c:2197 bch2_fs_get_tree+0x45d/0x1340 fs/bcachefs/fs.c:2489 vfs_get_tree+0x92/0x2b0 fs/super.c:1759 do_new_mount+0x24a/0xa40 fs/namespace.c:3884 do_mount fs/namespace.c:4224 [inline] __do_sys_mount fs/namespace.c:4435 [inline] __se_sys_mount+0x317/0x410 fs/namespace.c:4412 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xf6/0x210 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f845419010a 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:00007f84550c8e68 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 00007f84550c8ef0 RCX: 00007f845419010a RDX: 0000200000000080 RSI: 0000200000000180 RDI: 00007f84550c8eb0 RBP: 0000200000000080 R08: 00007f84550c8ef0 R09: 0000000000000010 R10: 0000000000000010 R11: 0000000000000246 R12: 0000200000000180 R13: 00007f84550c8eb0 R14: 0000000000005a0c R15: 0000200000000040