------------[ cut here ]------------ kernel BUG at fs/bcachefs/btree_journal_iter.c:190! Oops: invalid opcode: 0000 [#1] PREEMPT SMP KASAN PTI CPU: 0 UID: 0 PID: 5966 Comm: kworker/0:6 Not tainted 6.12.0-rc5-next-20241104-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024 Workqueue: bcachefs_write_ref bch2_delete_dead_snapshots_work (bcachefs-delete-dead-snapshots/) RIP: 0010:bch2_journal_key_insert_take+0x180f/0x1830 fs/bcachefs/btree_journal_iter.c:190 Code: f1 fc ff ff e8 52 d8 83 fd 90 0f 0b e8 4a d8 83 fd 90 0f 0b e8 42 d8 83 fd 90 0f 0b e8 3a d8 83 fd 90 0f 0b e8 32 d8 83 fd 90 <0f> 0b e8 ba 00 b3 07 e8 25 d8 83 fd 90 0f 0b e8 1d d8 83 fd 90 0f RSP: 0018:ffffc9000558edc0 EFLAGS: 00010293 RAX: ffffffff8411eeee RBX: 0000000000000040 RCX: ffff88802c63da00 RDX: 0000000000000000 RSI: 0000000000000040 RDI: 0000000000000000 RBP: ffffc9000558ef30 R08: ffffffff8411d8de R09: 1ffff11009f30035 R10: dffffc0000000000 R11: ffffed1009f30036 R12: 0000000000000000 R13: ffff88804f980000 R14: dffffc0000000000 R15: ffff88804f9cb310 FS: 0000000000000000(0000) GS:ffff8880b8600000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007fc6c43fea90 CR3: 0000000034b22000 CR4: 00000000003526f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: bch2_journal_key_insert+0xb3/0x130 fs/bcachefs/btree_journal_iter.c:260 do_bch2_trans_commit_to_journal_replay+0x111/0x420 fs/bcachefs/btree_trans_commit.c:1003 __bch2_trans_commit+0x1635/0x9480 fs/bcachefs/btree_trans_commit.c:1039 bch2_trans_commit fs/bcachefs/btree_update.h:184 [inline] bch2_delete_dead_snapshots+0x19b6/0x5ae0 fs/bcachefs/snapshot.c:1655 bch2_delete_dead_snapshots_work+0x34/0x40 fs/bcachefs/snapshot.c:1730 process_one_work kernel/workqueue.c:3229 [inline] process_scheduled_works+0xa63/0x1850 kernel/workqueue.c:3310 worker_thread+0x870/0xd30 kernel/workqueue.c:3391 kthread+0x2f0/0x390 kernel/kthread.c:389 ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 Modules linked in: ---[ end trace 0000000000000000 ]--- RIP: 0010:bch2_journal_key_insert_take+0x180f/0x1830 fs/bcachefs/btree_journal_iter.c:190 Code: f1 fc ff ff e8 52 d8 83 fd 90 0f 0b e8 4a d8 83 fd 90 0f 0b e8 42 d8 83 fd 90 0f 0b e8 3a d8 83 fd 90 0f 0b e8 32 d8 83 fd 90 <0f> 0b e8 ba 00 b3 07 e8 25 d8 83 fd 90 0f 0b e8 1d d8 83 fd 90 0f RSP: 0018:ffffc9000558edc0 EFLAGS: 00010293 RAX: ffffffff8411eeee RBX: 0000000000000040 RCX: ffff88802c63da00 RDX: 0000000000000000 RSI: 0000000000000040 RDI: 0000000000000000 RBP: ffffc9000558ef30 R08: ffffffff8411d8de R09: 1ffff11009f30035 R10: dffffc0000000000 R11: ffffed1009f30036 R12: 0000000000000000 R13: ffff88804f980000 R14: dffffc0000000000 R15: ffff88804f9cb310 FS: 0000000000000000(0000) GS:ffff8880b8600000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007fc6c43fea90 CR3: 000000006caf4000 CR4: 00000000003526f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400