------------[ cut here ]------------ kernel BUG at fs/bcachefs/btree_trans_commit.c:348! Oops: invalid opcode: 0000 [#1] SMP KASAN NOPTI CPU: 0 UID: 0 PID: 5366 Comm: syz.0.0 Not tainted syzkaller #0 PREEMPT(full) Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 RIP: 0010:btree_insert_entry_checks fs/bcachefs/btree_trans_commit.c:343 [inline] RIP: 0010:bch2_trans_commit_write_locked fs/bcachefs/btree_trans_commit.c:725 [inline] RIP: 0010:do_bch2_trans_commit fs/bcachefs/btree_trans_commit.c:854 [inline] RIP: 0010:__bch2_trans_commit+0x86e5/0x8870 fs/bcachefs/btree_trans_commit.c:1085 Code: 90 fd eb 0c e8 ac a6 90 fd eb 05 e8 a5 a6 90 fd 49 bd 00 00 00 00 00 fc ff df 4c 8b 64 24 48 e9 e1 af ff ff e8 8c a6 90 fd 90 <0f> 0b e8 84 a6 90 fd 90 0f 0b e8 7c a6 90 fd 90 0f 0b e8 74 a6 90 RSP: 0018:ffffc9000d327440 EFLAGS: 00010293 RAX: ffffffff842f14b4 RBX: ffffffff842ed685 RCX: ffff888035f24880 RDX: 0000000000000000 RSI: ffffffff8dba9fb9 RDI: ffff888035f24880 RBP: ffffc9000d327730 R08: 0000000000000000 R09: ffffffff842ed685 R10: dffffc0000000000 R11: ffffed100a819309 R12: ffff888052ae4020 R13: dffffc0000000000 R14: ffff888052ae64d8 R15: 0000000000000001 FS: 00007fa4acf956c0(0000) GS:ffff88808d210000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00002000000013c0 CR3: 0000000043625000 CR4: 0000000000352ef0 Call Trace: bch2_trans_commit fs/bcachefs/btree_update.h:241 [inline] bch2_xattr_set_handler+0x3d1/0x650 fs/bcachefs/xattr.c:359 __vfs_setxattr+0x439/0x480 fs/xattr.c:200 __vfs_setxattr_noperm+0x12d/0x660 fs/xattr.c:234 vfs_setxattr+0x16b/0x2f0 fs/xattr.c:321 do_setxattr fs/xattr.c:636 [inline] filename_setxattr+0x274/0x600 fs/xattr.c:665 path_setxattrat+0x364/0x3a0 fs/xattr.c:713 __do_sys_setxattr fs/xattr.c:747 [inline] __se_sys_setxattr fs/xattr.c:743 [inline] __x64_sys_setxattr+0xbc/0xe0 fs/xattr.c:743 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fa4ac18ebe9 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 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:00007fa4acf95038 EFLAGS: 00000246 ORIG_RAX: 00000000000000bc RAX: ffffffffffffffda RBX: 00007fa4ac3b5fa0 RCX: 00007fa4ac18ebe9 RDX: 00002000000013c0 RSI: 0000200000000140 RDI: 0000200000000100 RBP: 00007fa4ac211e19 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000700 R11: 0000000000000246 R12: 0000000000000000 R13: 00007fa4ac3b6038 R14: 00007fa4ac3b5fa0 R15: 00007ffe6511cc48 Modules linked in: ---[ end trace 0000000000000000 ]--- RIP: 0010:btree_insert_entry_checks fs/bcachefs/btree_trans_commit.c:343 [inline] RIP: 0010:bch2_trans_commit_write_locked fs/bcachefs/btree_trans_commit.c:725 [inline] RIP: 0010:do_bch2_trans_commit fs/bcachefs/btree_trans_commit.c:854 [inline] RIP: 0010:__bch2_trans_commit+0x86e5/0x8870 fs/bcachefs/btree_trans_commit.c:1085 Code: 90 fd eb 0c e8 ac a6 90 fd eb 05 e8 a5 a6 90 fd 49 bd 00 00 00 00 00 fc ff df 4c 8b 64 24 48 e9 e1 af ff ff e8 8c a6 90 fd 90 <0f> 0b e8 84 a6 90 fd 90 0f 0b e8 7c a6 90 fd 90 0f 0b e8 74 a6 90 RSP: 0018:ffffc9000d327440 EFLAGS: 00010293 RAX: ffffffff842f14b4 RBX: ffffffff842ed685 RCX: ffff888035f24880 RDX: 0000000000000000 RSI: ffffffff8dba9fb9 RDI: ffff888035f24880 RBP: ffffc9000d327730 R08: 0000000000000000 R09: ffffffff842ed685 R10: dffffc0000000000 R11: ffffed100a819309 R12: ffff888052ae4020 R13: dffffc0000000000 R14: ffff888052ae64d8 R15: 0000000000000001 FS: 00007fa4acf956c0(0000) GS:ffff88808d210000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00002000000013c0 CR3: 0000000043625000 CR4: 0000000000352ef0