RSP: 002b:00007f1cf92aefe8 EFLAGS: 00000246 ORIG_RAX: 00000000000001bf
RAX: ffffffffffffffda RBX: 00007f1cf8635fa0 RCX: 00007f1cf83a9a99
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000080000
RBP: 00007f1cf843918b R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f1cf8636038 R14: 00007f1cf8635fa0 R15: 00007fff373eb8f8
FAULT_INJECTION: forcing a failure.
name failslab, interval 1, probability 5, space 0, times 96
CPU: 0 UID: 0 PID: 5361 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
Call Trace:
dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120
fail_dump lib/fault-inject.c:80 [inline]
should_fail_ex+0x3eb/0x540 lib/fault-inject.c:181
should_failslab+0xa8/0x100 mm/failslab.c:46
slab_pre_alloc_hook mm/slub.c:4675 [inline]
slab_alloc_node mm/slub.c:5011 [inline]
kmem_cache_alloc_lru_noprof+0xa2/0x5f0 mm/slub.c:5066
__xas_nomem+0x33d/0x420 lib/xarray.c:341
__xa_cmpxchg_raw lib/xarray.c:1792 [inline]
__xa_cmpxchg+0x138/0x1f0 lib/xarray.c:1772
xa_cmpxchg include/linux/xarray.h:699 [inline]
xa_reserve include/linux/xarray.h:1088 [inline]
add_delayed_ref+0x2a7/0x1ec0 fs/btrfs/delayed-ref.c:1073
btrfs_alloc_tree_block+0xce7/0x1160 fs/btrfs/extent-tree.c:5423
btrfs_force_cow_block+0x562/0x1bf0 fs/btrfs/ctree.c:501
btrfs_cow_block+0x3f1/0xaf0 fs/btrfs/ctree.c:696
btrfs_search_slot+0xd6b/0x2d20 fs/btrfs/ctree.c:-1
btrfs_insert_empty_items+0xa3/0x1a0 fs/btrfs/ctree.c:4310
btrfs_insert_delayed_item fs/btrfs/delayed-inode.c:755 [inline]
btrfs_insert_delayed_items fs/btrfs/delayed-inode.c:832 [inline]
__btrfs_commit_inode_delayed_items+0xb0e/0x1ec0 fs/btrfs/delayed-inode.c:1114
__btrfs_run_delayed_items+0x1d0/0x420 fs/btrfs/delayed-inode.c:1157
btrfs_commit_transaction+0x844/0x2f90 fs/btrfs/transaction.c:2392
btrfs_sync_file+0xe91/0x13c0 fs/btrfs/file.c:1781
generic_write_sync include/linux/fs.h:2698 [inline]
btrfs_do_write_iter+0x640/0x790 fs/btrfs/file.c:1444
new_sync_write fs/read_write.c:575 [inline]
vfs_write+0x612/0xba0 fs/read_write.c:667
ksys_write+0x150/0x270 fs/read_write.c:719
do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline]
do_syscall_64+0x171/0x540 arch/x86/entry/syscall_64.c:89
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f1cf83a9a99
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:00007f1cf92aefe8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 00007f1cf8635fa0 RCX: 00007f1cf83a9a99
RDX: 0000000000000020 RSI: 000020000001db00 RDI: 000000000000000c
RBP: 00007f1cf843918b R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f1cf8636038 R14: 00007f1cf8635fa0 R15: 00007fff373eb8f8
BTRFS error (device loop0 state A): Transaction 9 aborted (-ENOMEM)
BTRFS: error (device loop0 state A) in __btrfs_run_delayed_items:1160: errno=-12 Out of memory
BTRFS info (device loop0 state EA): forced readonly
BTRFS warning (device loop0 state EA): Skipping commit of aborted transaction.
BTRFS: error (device loop0 state EA) in cleanup_transaction:2089: errno=-12 Out of memory
------------[ cut here ]------------
!xa_empty(&transaction->delayed_refs.head_refs)
WARNING: fs/btrfs/transaction.c:174 at btrfs_put_transaction+0x537/0x570 fs/btrfs/transaction.c:174, CPU#0: syz.0.0/5361
Modules linked in:
CPU: 0 UID: 0 PID: 5361 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:btrfs_put_transaction+0x537/0x570 fs/btrfs/transaction.c:174
Code: fd fb ff ff e8 aa 73 9e fd 4c 89 f7 be 03 00 00 00 48 83 c4 18 5b 41 5c 41 5d 41 5e 41 5f 5d e9 5f 8b c8 00 e8 8a 73 9e fd 90 <0f> 0b 90 e9 65 fb ff ff e8 7c 73 9e fd 90 0f 0b 90 e9 82 fb ff ff
RSP: 0018:ffffc9000ddbf5b0 EFLAGS: 00010283
RAX: ffffffff842ad086 RBX: ffff888041076000 RCX: 0000000000100000
RDX: ffffc9000ef5a000 RSI: 000000000001e0b4 RDI: 000000000001e0b5
RBP: dffffc0000000000 R08: ffff888041076013 R09: 1ffff1100820ec02
R10: dffffc0000000000 R11: ffffed100820ec03 R12: ffff8880523fc000
R13: ffff88805440fd60 R14: ffff888041076340 R15: ffff888041076000
FS: 00007f1cf92af6c0(0000) GS:ffff88808a9e9000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f7acdc30e9c CR3: 0000000014222000 CR4: 0000000000352ef0
Call Trace:
cleanup_transaction+0x53c/0x740 fs/btrfs/transaction.c:2132
btrfs_commit_transaction+0x2648/0x2f90 fs/btrfs/transaction.c:2680
btrfs_sync_file+0xe91/0x13c0 fs/btrfs/file.c:1781
generic_write_sync include/linux/fs.h:2698 [inline]
btrfs_do_write_iter+0x640/0x790 fs/btrfs/file.c:1444
new_sync_write fs/read_write.c:575 [inline]
vfs_write+0x612/0xba0 fs/read_write.c:667
ksys_write+0x150/0x270 fs/read_write.c:719
do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline]
do_syscall_64+0x171/0x540 arch/x86/entry/syscall_64.c:89
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f1cf83a9a99
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:00007f1cf92aefe8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 00007f1cf8635fa0 RCX: 00007f1cf83a9a99
RDX: 0000000000000020 RSI: 000020000001db00 RDI: 000000000000000c
RBP: 00007f1cf843918b R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f1cf8636038 R14: 00007f1cf8635fa0 R15: 00007fff373eb8f8