------------[ cut here ]------------ WARNING: CPU: 1 PID: 6293 at block/bio.c:512 bio_alloc_bioset+0xd61/0x1130 block/bio.c:512 Modules linked in: CPU: 1 UID: 0 PID: 6293 Comm: kworker/u8:9 Not tainted 6.15.0-rc1-next-20250411-syzkaller #0 PREEMPT(full) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2025 Workqueue: writeback wb_workfn (flush-bcachefs-6) RIP: 0010:bio_alloc_bioset+0xd61/0x1130 block/bio.c:512 Code: db f6 ff 81 ce 00 20 09 00 e8 9b f1 3f fd 48 85 c0 0f 84 a1 00 00 00 48 89 c5 e8 8a 55 e1 fc e9 7a f8 ff ff e8 80 55 e1 fc 90 <0f> 0b 90 e9 7b fb ff ff e8 72 55 e1 fc 90 0f 0b 90 44 8b 7c 24 20 RSP: 0018:ffffc9000e9c6cf0 EFLAGS: 00010293 RAX: ffffffff84e224c0 RBX: 0000000000000000 RCX: ffff88801ef13c00 RDX: 0000000000000000 RSI: 0000000000000100 RDI: 0000000000000000 RBP: dffffc0000000000 R08: ffffffff84e217c4 R09: 1ffffd40002b36f0 R10: dffffc0000000000 R11: fffff940002b36f1 R12: 0000000000000100 R13: 0000000000000cc0 R14: 0000000000000001 R15: 0000000000000100 FS: 0000000000000000(0000) GS:ffff888125080000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f6e4db82e12 CR3: 0000000032af8000 CR4: 00000000003526f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: bch2_writepage_io_alloc fs/bcachefs/fs-io-buffered.c:510 [inline] __bch2_writepage+0x1624/0x2780 fs/bcachefs/fs-io-buffered.c:644 write_cache_pages+0xd2/0x240 mm/page-writeback.c:2613 bch2_writepages+0x158/0x390 fs/bcachefs/fs-io-buffered.c:675 do_writepages+0x38c/0x640 mm/page-writeback.c:2635 __writeback_single_inode+0x14f/0x10d0 fs/fs-writeback.c:1680 writeback_sb_inodes+0x822/0x1360 fs/fs-writeback.c:1976 wb_writeback+0x415/0xb90 fs/fs-writeback.c:2156 wb_do_writeback fs/fs-writeback.c:2303 [inline] wb_workfn+0x412/0x10b0 fs/fs-writeback.c:2343 process_one_work kernel/workqueue.c:3238 [inline] process_scheduled_works+0xac3/0x18e0 kernel/workqueue.c:3319 worker_thread+0x870/0xd50 kernel/workqueue.c:3400 kthread+0x7b7/0x940 kernel/kthread.c:464 ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:153 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245