io_time[WRITE] 512 fragmentation 0 bp_start 8 incorrectly set at freespace:0:31:0 (free 0, genbits 0 should be 0), fixing ===================================================== BUG: KMSAN: uninit-value in try_alloc_bucket fs/bcachefs/alloc_foreground.c:280 [inline] BUG: KMSAN: uninit-value in bch2_bucket_alloc_freelist fs/bcachefs/alloc_foreground.c:425 [inline] BUG: KMSAN: uninit-value in bch2_bucket_alloc_trans+0x21a7/0x3280 fs/bcachefs/alloc_foreground.c:557 try_alloc_bucket fs/bcachefs/alloc_foreground.c:280 [inline] bch2_bucket_alloc_freelist fs/bcachefs/alloc_foreground.c:425 [inline] bch2_bucket_alloc_trans+0x21a7/0x3280 fs/bcachefs/alloc_foreground.c:557 bch2_bucket_alloc_set_trans+0x903/0x1590 fs/bcachefs/alloc_foreground.c:749 __open_bucket_add_buckets+0x1e98/0x3130 fs/bcachefs/alloc_foreground.c:992 open_bucket_add_buckets+0x32b/0x530 fs/bcachefs/alloc_foreground.c:1036 bch2_alloc_sectors_start_trans+0x1736/0x32d0 fs/bcachefs/alloc_foreground.c:1359 __bch2_btree_node_alloc fs/bcachefs/btree_update_interior.c:319 [inline] bch2_btree_reserve_get+0x9eb/0x22b0 fs/bcachefs/btree_update_interior.c:529 bch2_btree_update_start+0x22ac/0x2e90 fs/bcachefs/btree_update_interior.c:1229 bch2_btree_split_leaf+0x12b/0xcb0 fs/bcachefs/btree_update_interior.c:1864 bch2_trans_commit_error+0x4a2/0x1fc0 fs/bcachefs/btree_trans_commit.c:904 __bch2_trans_commit+0x346d/0xeb20 fs/bcachefs/btree_trans_commit.c:1069 bch2_trans_commit fs/bcachefs/btree_update.h:195 [inline] wb_flush_one_slowpath+0x1e6/0x220 fs/bcachefs/btree_write_buffer.c:127 wb_flush_one fs/bcachefs/btree_write_buffer.c:181 [inline] bch2_btree_write_buffer_flush_locked+0x3c6b/0x6900 fs/bcachefs/btree_write_buffer.c:398 btree_write_buffer_flush_seq+0x2b7b/0x2d60 fs/bcachefs/btree_write_buffer.c:570 bch2_btree_write_buffer_journal_flush+0x103/0x1f0 fs/bcachefs/btree_write_buffer.c:586 journal_flush_pins+0x1335/0x1fa0 fs/bcachefs/journal_reclaim.c:589 journal_flush_pins_or_still_flushing fs/bcachefs/journal_reclaim.c:859 [inline] journal_flush_done+0x157/0xe60 fs/bcachefs/journal_reclaim.c:877 bch2_journal_flush_pins+0x2a9/0x3b0 fs/bcachefs/journal_reclaim.c:909 bch2_journal_flush_all_pins fs/bcachefs/journal_reclaim.h:76 [inline] bch2_journal_replay+0x459f/0x49b0 fs/bcachefs/recovery.c:442 bch2_run_recovery_pass fs/bcachefs/recovery_passes.c:226 [inline] bch2_run_recovery_passes+0x5a2/0x1160 fs/bcachefs/recovery_passes.c:285 bch2_fs_recovery+0x489c/0x6230 fs/bcachefs/recovery.c:936 bch2_fs_start+0x5ce/0xbd0 fs/bcachefs/super.c:1065 bch2_fs_get_tree+0x1b5d/0x25e0 fs/bcachefs/fs.c:2253 vfs_get_tree+0xb1/0x5a0 fs/super.c:1759 do_new_mount+0x71f/0x15e0 fs/namespace.c:3881 path_mount+0x742/0x1f10 fs/namespace.c:4208 do_mount fs/namespace.c:4221 [inline] __do_sys_mount fs/namespace.c:4432 [inline] __se_sys_mount+0x71f/0x800 fs/namespace.c:4409 __x64_sys_mount+0xe4/0x150 fs/namespace.c:4409 x64_sys_call+0xed5/0x3c80 arch/x86/include/generated/asm/syscalls_64.h:166 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xcd/0x1b0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f Local variable gen.i.i created at: try_alloc_bucket fs/bcachefs/alloc_foreground.c:-1 [inline] bch2_bucket_alloc_freelist fs/bcachefs/alloc_foreground.c:425 [inline] bch2_bucket_alloc_trans+0x1fb8/0x3280 fs/bcachefs/alloc_foreground.c:557 bch2_bucket_alloc_set_trans+0x903/0x1590 fs/bcachefs/alloc_foreground.c:749 CPU: 0 UID: 0 PID: 15161 Comm: syz.2.1733 Tainted: G W 6.15.0-rc2-syzkaller-00404-g8560697b23dc #0 PREEMPT(undef) Tainted: [W]=WARN Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2025 =====================================================