loop0: detected capacity change from 0 to 32768
BTRFS: device fsid 395ef67a-297e-477c-816d-cd80a5b93e5d devid 1 transid 8 /dev/loop0 (7:0) scanned by syz.0.0 (5341)
BTRFS info (device loop0): first mount of filesystem 395ef67a-297e-477c-816d-cd80a5b93e5d
BTRFS info (device loop0): using sha256 (sha256-lib) checksum algorithm
BTRFS info (device loop0): rebuilding free space tree
BTRFS info (device loop0): enabling ssd optimizations
BTRFS info (device loop0): using spread ssd allocation scheme
BTRFS info (device loop0): turning on async discard
BTRFS info (device loop0): enabling free space tree
BTRFS info (device loop0): force clearing of disk cache
BTRFS info (device loop0): setting incompat feature flag for SIMPLE_QUOTA (0x10000)
FAULT_INJECTION: forcing a failure.
name failslab, interval 1, probability 0, space 0, times 1
CPU: 0 UID: 0 PID: 5341 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
Call Trace:
dump_stack_lvl+0x189/0x250 lib/dump_stack.c:120
fail_dump lib/fault-inject.c:73 [inline]
should_fail_ex+0x414/0x560 lib/fault-inject.c:174
should_failslab+0xa8/0x100 mm/failslab.c:46
slab_pre_alloc_hook mm/slub.c:4901 [inline]
slab_alloc_node mm/slub.c:5234 [inline]
kmem_cache_alloc_noprof+0x88/0x710 mm/slub.c:5265
add_delayed_ref+0x118/0x1e70 fs/btrfs/delayed-ref.c:1017
btrfs_alloc_tree_block+0xcf8/0x1220 fs/btrfs/extent-tree.c:5208
btrfs_force_cow_block+0x578/0x2410 fs/btrfs/ctree.c:517
btrfs_cow_block+0x3c4/0xa80 fs/btrfs/ctree.c:708
btrfs_search_slot+0xd23/0x2ce0 fs/btrfs/ctree.c:2130
btrfs_insert_empty_items+0x9c/0x190 fs/btrfs/ctree.c:4315
btrfs_insert_empty_item fs/btrfs/ctree.h:665 [inline]
add_qgroup_item+0x165/0x4a0 fs/btrfs/qgroup.c:731
btrfs_qgroup_inherit+0x8a7/0x28a0 fs/btrfs/qgroup.c:3351
create_subvol+0x5ad/0x18f0 fs/btrfs/ioctl.c:570
btrfs_mksubvol+0x6e4/0x12c0 fs/btrfs/ioctl.c:928
__btrfs_ioctl_snap_create+0x2b2/0x730 fs/btrfs/ioctl.c:1201
btrfs_ioctl_snap_create+0x131/0x180 fs/btrfs/ioctl.c:1259
btrfs_ioctl+0xb4d/0xd00 fs/btrfs/ioctl.c:-1
vfs_ioctl fs/ioctl.c:51 [inline]
__do_sys_ioctl fs/ioctl.c:597 [inline]
__se_sys_ioctl+0xfc/0x170 fs/ioctl.c:583
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0xfa/0xf80 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f14b898f7c9
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:00007f14b9745038 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007f14b8be5fa0 RCX: 00007f14b898f7c9
RDX: 0000200000000280 RSI: 000000005000940e RDI: 0000000000000003
RBP: 00007f14b9745090 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000002
R13: 00007f14b8be6038 R14: 00007f14b8be5fa0 R15: 00007ffef7b0b438
assertion failed: prealloc == NULL :: 0, in fs/btrfs/qgroup.c:3529
------------[ cut here ]------------
kernel BUG at fs/btrfs/qgroup.c:3529!
Oops: invalid opcode: 0000 [#1] SMP KASAN NOPTI
CPU: 0 UID: 0 PID: 5341 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:btrfs_qgroup_inherit+0x2892/0x28a0 fs/btrfs/qgroup.c:3529
Code: ff ff e8 d1 1f d4 fd 48 c7 c7 a0 e5 b0 8b 48 c7 c6 00 e6 b0 8b 31 d2 48 c7 c1 20 e2 b0 8b 41 b8 c9 0d 00 00 e8 ef 58 3a fd 90 <0f> 0b 66 66 66 2e 0f 1f 84 00 00 00 00 00 90 90 90 90 90 90 90 90
RSP: 0018:ffffc9000d4c7740 EFLAGS: 00010246
RAX: 0000000000000042 RBX: 0000000000000000 RCX: 4a7c08bdd4619100
RDX: 0000000000000000 RSI: 0000000080000000 RDI: 0000000000000000
RBP: ffffc9000d4c7990 R08: ffffc9000d4c7467 R09: 1ffff92001a98e8c
R10: dffffc0000000000 R11: fffff52001a98e8d R12: 0000000000000000
R13: 0000000000000000 R14: 0000000000000000 R15: 00000000fffffff4
FS: 00007f14b97456c0(0000) GS:ffff88808d679000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007ffe40a2f128 CR3: 000000003fe4a000 CR4: 0000000000352ef0
Call Trace:
create_subvol+0x5ad/0x18f0 fs/btrfs/ioctl.c:570
btrfs_mksubvol+0x6e4/0x12c0 fs/btrfs/ioctl.c:928
__btrfs_ioctl_snap_create+0x2b2/0x730 fs/btrfs/ioctl.c:1201
btrfs_ioctl_snap_create+0x131/0x180 fs/btrfs/ioctl.c:1259
btrfs_ioctl+0xb4d/0xd00 fs/btrfs/ioctl.c:-1
vfs_ioctl fs/ioctl.c:51 [inline]
__do_sys_ioctl fs/ioctl.c:597 [inline]
__se_sys_ioctl+0xfc/0x170 fs/ioctl.c:583
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0xfa/0xf80 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f14b898f7c9
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:00007f14b9745038 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007f14b8be5fa0 RCX: 00007f14b898f7c9
RDX: 0000200000000280 RSI: 000000005000940e RDI: 0000000000000003
RBP: 00007f14b9745090 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000002
R13: 00007f14b8be6038 R14: 00007f14b8be5fa0 R15: 00007ffef7b0b438
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:btrfs_qgroup_inherit+0x2892/0x28a0 fs/btrfs/qgroup.c:3529
Code: ff ff e8 d1 1f d4 fd 48 c7 c7 a0 e5 b0 8b 48 c7 c6 00 e6 b0 8b 31 d2 48 c7 c1 20 e2 b0 8b 41 b8 c9 0d 00 00 e8 ef 58 3a fd 90 <0f> 0b 66 66 66 2e 0f 1f 84 00 00 00 00 00 90 90 90 90 90 90 90 90
RSP: 0018:ffffc9000d4c7740 EFLAGS: 00010246
RAX: 0000000000000042 RBX: 0000000000000000 RCX: 4a7c08bdd4619100
RDX: 0000000000000000 RSI: 0000000080000000 RDI: 0000000000000000
RBP: ffffc9000d4c7990 R08: ffffc9000d4c7467 R09: 1ffff92001a98e8c
R10: dffffc0000000000 R11: fffff52001a98e8d R12: 0000000000000000
R13: 0000000000000000 R14: 0000000000000000 R15: 00000000fffffff4
FS: 00007f14b97456c0(0000) GS:ffff88808d679000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f14b4df5990 CR3: 000000003fe4a000 CR4: 0000000000352ef0