FAULT_INJECTION: forcing a failure.
name failslab, interval 1, probability 0, space 0, times 1
CPU: 0 UID: 0 PID: 5319 Comm: syz.0.0 Not tainted 6.13.0-rc1-syzkaller-00025-gfeffde684ac2 #0
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014
Call Trace:
__dump_stack lib/dump_stack.c:94 [inline]
dump_stack_lvl+0x241/0x360 lib/dump_stack.c:120
fail_dump lib/fault-inject.c:53 [inline]
should_fail_ex+0x3b0/0x4e0 lib/fault-inject.c:154
should_failslab+0xac/0x100 mm/failslab.c:46
slab_pre_alloc_hook mm/slub.c:4057 [inline]
slab_alloc_node mm/slub.c:4133 [inline]
kmem_cache_alloc_noprof+0x70/0x380 mm/slub.c:4160
add_delayed_ref+0x19e/0x1e90 fs/btrfs/delayed-ref.c:987
btrfs_alloc_tree_block+0xdfc/0x1440 fs/btrfs/extent-tree.c:5178
btrfs_force_cow_block+0x526/0x1da0 fs/btrfs/ctree.c:573
btrfs_cow_block+0x35e/0xa40 fs/btrfs/ctree.c:754
btrfs_search_slot+0xc01/0x3180 fs/btrfs/ctree.c:2156
btrfs_update_device+0x1b0/0x580 fs/btrfs/volumes.c:3020
btrfs_chunk_alloc_add_chunk_item+0x2cb/0x1100 fs/btrfs/volumes.c:5752
do_chunk_alloc fs/btrfs/block-group.c:3899 [inline]
btrfs_chunk_alloc+0x7ca/0xf80 fs/btrfs/block-group.c:4187
find_free_extent_update_loop fs/btrfs/extent-tree.c:4166 [inline]
find_free_extent+0x42d1/0x5810 fs/btrfs/extent-tree.c:4579
btrfs_reserve_extent+0x422/0x810 fs/btrfs/extent-tree.c:4672
btrfs_new_extent_direct fs/btrfs/direct-io.c:186 [inline]
btrfs_get_blocks_direct_write+0x706/0xfa0 fs/btrfs/direct-io.c:321
btrfs_dio_iomap_begin+0xbb7/0x1180 fs/btrfs/direct-io.c:525
iomap_iter+0x697/0xf60 fs/iomap/iter.c:90
__iomap_dio_rw+0xeb9/0x25b0 fs/iomap/direct-io.c:702
btrfs_dio_write fs/btrfs/direct-io.c:775 [inline]
btrfs_direct_write+0x610/0xa30 fs/btrfs/direct-io.c:880
btrfs_do_write_iter+0x2a0/0x760 fs/btrfs/file.c:1396
do_iter_readv_writev+0x600/0x880
vfs_writev+0x376/0xba0 fs/read_write.c:1050
do_pwritev fs/read_write.c:1146 [inline]
__do_sys_pwritev2 fs/read_write.c:1204 [inline]
__se_sys_pwritev2+0x196/0x2b0 fs/read_write.c:1195
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7fbc4b57ff19
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:00007fbc4c2ed058 EFLAGS: 00000246 ORIG_RAX: 0000000000000148
RAX: ffffffffffffffda RBX: 00007fbc4b746080 RCX: 00007fbc4b57ff19
RDX: 0000000000000001 RSI: 0000000020000240 RDI: 0000000000000007
RBP: 00007fbc4c2ed0a0 R08: 0000000000000000 R09: 0000000000000003
R10: 0000000000007000 R11: 0000000000000246 R12: 0000000000000002
R13: 0000000000000000 R14: 00007fbc4b746080 R15: 00007ffd12e81e18
BTRFS error (device loop0 state A): Transaction aborted (error -12)
BTRFS: error (device loop0 state A) in do_chunk_alloc:3961: errno=-12 Out of memory
BTRFS info (device loop0 state EA): forced readonly
------------[ cut here ]------------
WARNING: CPU: 0 PID: 5319 at fs/btrfs/space-info.h:250 btrfs_space_info_update_bytes_may_use+0x34c/0x660 fs/btrfs/space-info.h:250
Modules linked in:
CPU: 0 UID: 0 PID: 5319 Comm: syz.0.0 Not tainted 6.13.0-rc1-syzkaller-00025-gfeffde684ac2 #0
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014
RIP: 0010:btrfs_space_info_update_bytes_may_use+0x34c/0x660 fs/btrfs/space-info.h:250
Code: 00 00 74 08 4c 89 ff e8 22 4c 23 fe 49 8b 1f 48 89 df 48 8b 6c 24 20 48 89 ee e8 9f 66 b8 fd 48 39 eb 73 1d e8 35 64 b8 fd 90 <0f> 0b 90 45 31 f6 43 80 7c 25 00 00 0f 85 2e ff ff ff e9 31 ff ff
RSP: 0018:ffffc9000d3deb38 EFLAGS: 00010293
RAX: ffffffff83e70deb RBX: 000000000005c000 RCX: ffff888000d0a440
RDX: 0000000000000000 RSI: 0000000000060000 RDI: 000000000005c000
RBP: 0000000000060000 R08: ffffffff83e70de1 R09: 1ffffffff20328be
R10: dffffc0000000000 R11: fffffbfff20328bf R12: dffffc0000000000
R13: 1ffff1100815880d R14: fffffffffffa0000 R15: ffff888040ac4068
FS: 00007fbc4c2ed6c0(0000) GS:ffff88801fc00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000000004 CR3: 0000000042ec2000 CR4: 0000000000352ef0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
btrfs_space_info_free_bytes_may_use fs/btrfs/space-info.h:283 [inline]
block_rsv_release_bytes fs/btrfs/block-rsv.c:153 [inline]
btrfs_block_rsv_release+0x4f4/0x5f0 fs/btrfs/block-rsv.c:294
btrfs_trans_release_chunk_metadata+0x7f/0xb0 fs/btrfs/transaction.c:253
do_chunk_alloc fs/btrfs/block-group.c:3965 [inline]
btrfs_chunk_alloc+0xd68/0xf80 fs/btrfs/block-group.c:4187
find_free_extent_update_loop fs/btrfs/extent-tree.c:4166 [inline]
find_free_extent+0x42d1/0x5810 fs/btrfs/extent-tree.c:4579
btrfs_reserve_extent+0x422/0x810 fs/btrfs/extent-tree.c:4672
btrfs_new_extent_direct fs/btrfs/direct-io.c:186 [inline]
btrfs_get_blocks_direct_write+0x706/0xfa0 fs/btrfs/direct-io.c:321
btrfs_dio_iomap_begin+0xbb7/0x1180 fs/btrfs/direct-io.c:525
iomap_iter+0x697/0xf60 fs/iomap/iter.c:90
__iomap_dio_rw+0xeb9/0x25b0 fs/iomap/direct-io.c:702
btrfs_dio_write fs/btrfs/direct-io.c:775 [inline]
btrfs_direct_write+0x610/0xa30 fs/btrfs/direct-io.c:880
btrfs_do_write_iter+0x2a0/0x760 fs/btrfs/file.c:1396
do_iter_readv_writev+0x600/0x880
vfs_writev+0x376/0xba0 fs/read_write.c:1050
do_pwritev fs/read_write.c:1146 [inline]
__do_sys_pwritev2 fs/read_write.c:1204 [inline]
__se_sys_pwritev2+0x196/0x2b0 fs/read_write.c:1195
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7fbc4b57ff19
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:00007fbc4c2ed058 EFLAGS: 00000246 ORIG_RAX: 0000000000000148
RAX: ffffffffffffffda RBX: 00007fbc4b746080 RCX: 00007fbc4b57ff19
RDX: 0000000000000001 RSI: 0000000020000240 RDI: 0000000000000007
RBP: 00007fbc4c2ed0a0 R08: 0000000000000000 R09: 0000000000000003
R10: 0000000000007000 R11: 0000000000000246 R12: 0000000000000002
R13: 0000000000000000 R14: 00007fbc4b746080 R15: 00007ffd12e81e18