R10: 0000000000028000 R11: 0000000000000246 R12: 0000000000000002 R13: 000000000000000b R14: 00007f342b7abf80 R15: 00007ffd02fc7048 ------------[ cut here ]------------ kernel BUG at fs/btrfs/extent-tree.c:3462! invalid opcode: 0000 [#1] PREEMPT SMP KASAN NOPTI CPU: 3 PID: 21633 Comm: syz-executor.1 Not tainted 6.8.0-rc7-syzkaller-00142-g3aaa8ce7a335 #0 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.2-debian-1.16.2-1 04/01/2014 RIP: 0010:btrfs_free_tree_block+0x845/0xb60 fs/btrfs/extent-tree.c:3462 Code: 02 00 00 48 8b 13 41 b8 01 00 00 00 4c 89 e7 48 89 ee e8 1e 80 fe ff 48 89 ef e8 56 4d 27 00 e9 74 fb ff ff e8 2c 7b 0d fe 90 <0f> 0b e8 24 7b 0d fe 4c 89 ea 48 b8 00 00 00 00 00 fc ff df 48 c1 RSP: 0018:ffffc900040dec68 EFLAGS: 00010246 RAX: 0000000000040000 RBX: ffff88802630b0e0 RCX: ffffc9000e4ec000 RDX: 0000000000040000 RSI: ffffffff837dd3b4 RDI: 0000000000000005 RBP: 000000000000000a R08: 0000000000000005 R09: 0000000000000000 R10: 00000000fffffff4 R11: 0000000000000009 R12: ffff888110701280 R13: ffff88802630b0e8 R14: 00000000fffffff4 R15: 0000000000000001 FS: 00007f342c3eb6c0(0000) GS:ffff88806b500000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000020103030 CR3: 000000001f082000 CR4: 0000000000350ef0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: btrfs_force_cow_block+0xfe7/0x19e0 fs/btrfs/ctree.c:626 btrfs_cow_block+0x2b6/0xb30 fs/btrfs/ctree.c:749 btrfs_search_slot+0x11bd/0x3010 fs/btrfs/ctree.c:2104 btrfs_search_prev_slot.constprop.0+0x36/0x110 fs/btrfs/free-space-tree.c:140 add_free_space_extent fs/btrfs/free-space-tree.c:910 [inline] __add_to_free_space_tree+0x36a/0xbf0 fs/btrfs/free-space-tree.c:1021 add_to_free_space_tree+0x17d/0x330 fs/btrfs/free-space-tree.c:1050 do_free_extent_accounting fs/btrfs/extent-tree.c:3010 [inline] __btrfs_free_extent.isra.0+0x1137/0x2f70 fs/btrfs/extent-tree.c:3380 run_delayed_data_ref fs/btrfs/extent-tree.c:1614 [inline] run_one_delayed_ref fs/btrfs/extent-tree.c:1804 [inline] btrfs_run_delayed_refs_for_head fs/btrfs/extent-tree.c:2065 [inline] __btrfs_run_delayed_refs+0x1161/0x3f20 fs/btrfs/extent-tree.c:2135 btrfs_run_delayed_refs+0x1a6/0x330 fs/btrfs/extent-tree.c:2247 btrfs_commit_transaction+0x783/0x3b40 fs/btrfs/transaction.c:2201 btrfs_sync_file+0xf9b/0x1310 fs/btrfs/file.c:2007 vfs_fsync_range+0x141/0x230 fs/sync.c:188 generic_write_sync include/linux/fs.h:2734 [inline] btrfs_do_write_iter+0x57a/0x1120 fs/btrfs/file.c:1697 call_write_iter include/linux/fs.h:2087 [inline] do_iter_readv_writev+0x41d/0x670 fs/read_write.c:741 vfs_writev+0x36f/0xdb0 fs/read_write.c:971 do_pwritev+0x1b3/0x260 fs/read_write.c:1072 __do_sys_pwritev2 fs/read_write.c:1131 [inline] __se_sys_pwritev2 fs/read_write.c:1122 [inline] __x64_sys_pwritev2+0xef/0x160 fs/read_write.c:1122 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xd5/0x270 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x6f/0x77 RIP: 0033:0x7f342b67dda9 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 e1 20 00 00 90 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 b0 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f342c3eb0c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000148 RAX: ffffffffffffffda RBX: 00007f342b7abf80 RCX: 00007f342b67dda9 RDX: 0000000000000001 RSI: 0000000020000240 RDI: 0000000000000005 RBP: 00007f342c3eb120 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000028000 R11: 0000000000000246 R12: 0000000000000002 R13: 000000000000000b R14: 00007f342b7abf80 R15: 00007ffd02fc7048 Modules linked in: ---[ end trace 0000000000000000 ]--- RIP: 0010:btrfs_free_tree_block+0x845/0xb60 fs/btrfs/extent-tree.c:3462 Code: 02 00 00 48 8b 13 41 b8 01 00 00 00 4c 89 e7 48 89 ee e8 1e 80 fe ff 48 89 ef e8 56 4d 27 00 e9 74 fb ff ff e8 2c 7b 0d fe 90 <0f> 0b e8 24 7b 0d fe 4c 89 ea 48 b8 00 00 00 00 00 fc ff df 48 c1 RSP: 0018:ffffc900040dec68 EFLAGS: 00010246 RAX: 0000000000040000 RBX: ffff88802630b0e0 RCX: ffffc9000e4ec000 RDX: 0000000000040000 RSI: ffffffff837dd3b4 RDI: 0000000000000005 RBP: 000000000000000a R08: 0000000000000005 R09: 0000000000000000 R10: 00000000fffffff4 R11: 0000000000000009 R12: ffff888110701280 R13: ffff88802630b0e8 R14: 00000000fffffff4 R15: 0000000000000001 FS: 00007f342c3eb6c0(0000) GS:ffff88806b500000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000020011000 CR3: 000000001f082000 CR4: 0000000000350ef0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400