------------[ cut here ]------------ BTRFS: Transaction aborted (error -28) WARNING: fs/btrfs/block-group.c:4012 at do_chunk_alloc fs/btrfs/block-group.c:4012 [inline], CPU#0: syz.0.0/5324 WARNING: fs/btrfs/block-group.c:4012 at btrfs_chunk_alloc+0x101d/0x15d0 fs/btrfs/block-group.c:4253, CPU#0: syz.0.0/5324 Modules linked in: CPU: 0 UID: 0 PID: 5324 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 04/01/2014 RIP: 0010:do_chunk_alloc fs/btrfs/block-group.c:4012 [inline] RIP: 0010:btrfs_chunk_alloc+0x101f/0x15d0 fs/btrfs/block-group.c:4253 Code: 57 1a bd fd e9 6d 01 00 00 e8 fd 3d a2 fd 84 c0 74 22 e8 44 1a bd fd e9 5a 01 00 00 e8 3a 1a bd fd 48 8d 3d e3 54 f1 0b 89 de <67> 48 0f b9 3a e9 b3 fc ff ff e8 c2 a7 91 07 41 89 c6 31 ff 89 c6 RSP: 0018:ffffc90009e6e9f8 EFLAGS: 00010283 RAX: ffffffff84076cb6 RBX: ffffffffffffffe4 RCX: 0000000000100000 RDX: ffffc90021003000 RSI: 00000000ffffffe4 RDI: ffffffff8ff8c1a0 RBP: 0000000000000000 R08: ffff888037f4a4c0 R09: 0000000000000003 R10: 00000000fffffffb R11: 0000000000000002 R12: 1ffff11008571b16 R13: ffff888023003500 R14: ffff888042b38001 R15: ffff88801261f800 FS: 00007fb9191fa6c0(0000) GS:ffff88808ccea000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000200000004000 CR3: 00000000305a1000 CR4: 0000000000352ef0 Call Trace: find_free_extent_update_loop fs/btrfs/extent-tree.c:4199 [inline] find_free_extent+0x45c3/0x5d00 fs/btrfs/extent-tree.c:4611 btrfs_reserve_extent+0x30e/0x7f0 fs/btrfs/extent-tree.c:4705 cow_file_range+0x539/0x1420 fs/btrfs/inode.c:1388 writepage_delalloc+0x11ac/0x1db0 fs/btrfs/extent_io.c:1501 extent_writepage fs/btrfs/extent_io.c:1864 [inline] extent_write_cache_pages fs/btrfs/extent_io.c:2551 [inline] btrfs_writepages+0x14d3/0x23f0 fs/btrfs/extent_io.c:2684 do_writepages+0x32e/0x550 mm/page-writeback.c:2598 filemap_writeback mm/filemap.c:387 [inline] filemap_fdatawrite_range+0x1ef/0x2f0 mm/filemap.c:412 btrfs_fdatawrite_range fs/btrfs/file.c:3891 [inline] start_ordered_ops fs/btrfs/file.c:1518 [inline] btrfs_sync_file+0x3c1/0x1210 fs/btrfs/file.c:1600 generic_write_sync include/linux/fs.h:2618 [inline] btrfs_do_write_iter+0x69f/0x830 fs/btrfs/file.c:1470 new_sync_write fs/read_write.c:593 [inline] vfs_write+0x61d/0xb90 fs/read_write.c:686 ksys_pwrite64 fs/read_write.c:793 [inline] __do_sys_pwrite64 fs/read_write.c:801 [inline] __se_sys_pwrite64 fs/read_write.c:798 [inline] __x64_sys_pwrite64+0x199/0x230 fs/read_write.c:798 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xe2/0xf80 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fb91839aeb9 Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 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 e8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fb9191fa028 EFLAGS: 00000246 ORIG_RAX: 0000000000000012 RAX: ffffffffffffffda RBX: 00007fb918616090 RCX: 00007fb91839aeb9 RDX: 0000000000005000 RSI: 0000200000000280 RDI: 0000000000000006 RBP: 00007fb918408c1f R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000410000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007fb918616128 R14: 00007fb918616090 R15: 00007ffeeae27148 ---------------- Code disassembly (best guess): 0: 57 push %rdi 1: 1a bd fd e9 6d 01 sbb 0x16de9fd(%rbp),%bh 7: 00 00 add %al,(%rax) 9: e8 fd 3d a2 fd call 0xfda23e0b e: 84 c0 test %al,%al 10: 74 22 je 0x34 12: e8 44 1a bd fd call 0xfdbd1a5b 17: e9 5a 01 00 00 jmp 0x176 1c: e8 3a 1a bd fd call 0xfdbd1a5b 21: 48 8d 3d e3 54 f1 0b lea 0xbf154e3(%rip),%rdi # 0xbf1550b 28: 89 de mov %ebx,%esi * 2a: 67 48 0f b9 3a ud1 (%edx),%rdi <-- trapping instruction 2f: e9 b3 fc ff ff jmp 0xfffffce7 34: e8 c2 a7 91 07 call 0x791a7fb 39: 41 89 c6 mov %eax,%r14d 3c: 31 ff xor %edi,%edi 3e: 89 c6 mov %eax,%esi