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 (5322) BTRFS info (device loop0): first mount of filesystem 395ef67a-297e-477c-816d-cd80a5b93e5d BTRFS info (device loop0): using sha256 checksum algorithm BTRFS info (device loop0): enabling ssd optimizations BTRFS info (device loop0): turning on async discard BTRFS info (device loop0): enabling free space tree 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: 5322 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:73 [inline] should_fail_ex+0x412/0x560 lib/fault-inject.c:174 should_failslab+0xa8/0x100 mm/failslab.c:46 slab_pre_alloc_hook mm/slub.c:4491 [inline] slab_alloc_node mm/slub.c:4843 [inline] __kmalloc_cache_noprof+0x88/0x660 mm/slub.c:5375 kmalloc_noprof include/linux/slab.h:950 [inline] ulist_add_merge+0x196/0x4c0 fs/btrfs/ulist.c:222 add_extent_changeset fs/btrfs/extent-io-tree.c:198 [inline] clear_state_bit+0x15f/0x3c0 fs/btrfs/extent-io-tree.c:569 btrfs_clear_extent_bit_changeset+0x725/0xb80 fs/btrfs/extent-io-tree.c:746 __btrfs_qgroup_release_data+0x22f/0xae0 fs/btrfs/qgroup.c:4395 alloc_ordered_extent+0xdf/0x6a0 fs/btrfs/ordered-data.c:168 btrfs_alloc_ordered_extent+0x200/0xae0 fs/btrfs/ordered-data.c:-1 nocow_one_range fs/btrfs/inode.c:2061 [inline] run_delalloc_nocow+0xaee/0x17a0 fs/btrfs/inode.c:2301 writepage_delalloc+0x1270/0x1ee0 fs/btrfs/extent_io.c:1526 extent_writepage fs/btrfs/extent_io.c:1893 [inline] extent_write_cache_pages fs/btrfs/extent_io.c:2580 [inline] btrfs_writepages+0x14df/0x2440 fs/btrfs/extent_io.c:2713 do_writepages+0x32e/0x550 mm/page-writeback.c:2554 filemap_writeback mm/filemap.c:387 [inline] filemap_fdatawrite_range+0x1ef/0x2f0 mm/filemap.c:412 btrfs_fdatawrite_range+0x54/0xf0 fs/btrfs/file.c:3891 btrfs_direct_write+0x5e9/0xb70 fs/btrfs/direct-io.c:987 btrfs_do_write_iter+0x39c/0x880 fs/btrfs/file.c:1458 iter_file_splice_write+0x9a1/0x10f0 fs/splice.c:736 do_splice_from fs/splice.c:936 [inline] direct_splice_actor+0x101/0x160 fs/splice.c:1159 splice_direct_to_actor+0x53a/0xc70 fs/splice.c:1103 do_splice_direct_actor fs/splice.c:1202 [inline] do_splice_direct+0x195/0x290 fs/splice.c:1228 do_sendfile+0x535/0x7d0 fs/read_write.c:1372 __do_sys_sendfile64 fs/read_write.c:1433 [inline] __se_sys_sendfile64+0x144/0x1a0 fs/read_write.c:1419 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0x14d/0xf80 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f5e53d9c819 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:00007f5e54bccfe8 EFLAGS: 00000246 ORIG_RAX: 0000000000000028 RAX: ffffffffffffffda RBX: 00007f5e54015fa0 RCX: 00007f5e53d9c819 RDX: 0000000000000000 RSI: 0000000000000005 RDI: 0000000000000005 RBP: 00007f5e54bcd050 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000800000a1e R11: 0000000000000246 R12: 0000000000000002 R13: 00007f5e54016038 R14: 00007f5e54015fa0 R15: 00007ffc4a01d0a8 ------------[ cut here ]------------ kernel BUG at fs/btrfs/extent-io-tree.c:570! Oops: invalid opcode: 0000 [#1] SMP KASAN NOPTI CPU: 0 UID: 0 PID: 5322 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:clear_state_bit+0x3be/0x3c0 fs/btrfs/extent-io-tree.c:570 Code: fe e9 27 fd ff ff 44 89 e9 80 e1 07 80 c1 03 38 c1 0f 8c 3e fe ff ff 4c 89 ef e8 1d 2a 1a fe e9 31 fe ff ff e8 23 4f ae fd 90 <0f> 0b 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 0f 1f 40 d6 RSP: 0018:ffffc9000de7e6d0 EFLAGS: 00010293 RAX: ffffffff84176f6d RBX: ffff888041817a80 RCX: ffff888033f90000 RDX: 0000000000000000 RSI: 00000000fffffff4 RDI: 0000000000000000 RBP: 0000000000001000 R08: 0000000000000820 R09: 00000000ffffffff R10: dffffc0000000000 R11: fffffbfff1d145fb R12: 0000000000000000 R13: ffffc9000de7e8b8 R14: 0000000000001000 R15: 00000000fffffff4 FS: 00007f5e54bcd6c0(0000) GS:ffff88808ca4c000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000055565ca5c5f8 CR3: 000000003912f000 CR4: 0000000000352ef0 Call Trace: btrfs_clear_extent_bit_changeset+0x725/0xb80 fs/btrfs/extent-io-tree.c:746 __btrfs_qgroup_release_data+0x22f/0xae0 fs/btrfs/qgroup.c:4395 alloc_ordered_extent+0xdf/0x6a0 fs/btrfs/ordered-data.c:168 btrfs_alloc_ordered_extent+0x200/0xae0 fs/btrfs/ordered-data.c:-1 nocow_one_range fs/btrfs/inode.c:2061 [inline] run_delalloc_nocow+0xaee/0x17a0 fs/btrfs/inode.c:2301 writepage_delalloc+0x1270/0x1ee0 fs/btrfs/extent_io.c:1526 extent_writepage fs/btrfs/extent_io.c:1893 [inline] extent_write_cache_pages fs/btrfs/extent_io.c:2580 [inline] btrfs_writepages+0x14df/0x2440 fs/btrfs/extent_io.c:2713 do_writepages+0x32e/0x550 mm/page-writeback.c:2554 filemap_writeback mm/filemap.c:387 [inline] filemap_fdatawrite_range+0x1ef/0x2f0 mm/filemap.c:412 btrfs_fdatawrite_range+0x54/0xf0 fs/btrfs/file.c:3891 btrfs_direct_write+0x5e9/0xb70 fs/btrfs/direct-io.c:987 btrfs_do_write_iter+0x39c/0x880 fs/btrfs/file.c:1458 iter_file_splice_write+0x9a1/0x10f0 fs/splice.c:736 do_splice_from fs/splice.c:936 [inline] direct_splice_actor+0x101/0x160 fs/splice.c:1159 splice_direct_to_actor+0x53a/0xc70 fs/splice.c:1103 do_splice_direct_actor fs/splice.c:1202 [inline] do_splice_direct+0x195/0x290 fs/splice.c:1228 do_sendfile+0x535/0x7d0 fs/read_write.c:1372 __do_sys_sendfile64 fs/read_write.c:1433 [inline] __se_sys_sendfile64+0x144/0x1a0 fs/read_write.c:1419 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0x14d/0xf80 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f5e53d9c819 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:00007f5e54bccfe8 EFLAGS: 00000246 ORIG_RAX: 0000000000000028 RAX: ffffffffffffffda RBX: 00007f5e54015fa0 RCX: 00007f5e53d9c819 RDX: 0000000000000000 RSI: 0000000000000005 RDI: 0000000000000005 RBP: 00007f5e54bcd050 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000800000a1e R11: 0000000000000246 R12: 0000000000000002 R13: 00007f5e54016038 R14: 00007f5e54015fa0 R15: 00007ffc4a01d0a8 Modules linked in: ---[ end trace 0000000000000000 ]--- RIP: 0010:clear_state_bit+0x3be/0x3c0 fs/btrfs/extent-io-tree.c:570 Code: fe e9 27 fd ff ff 44 89 e9 80 e1 07 80 c1 03 38 c1 0f 8c 3e fe ff ff 4c 89 ef e8 1d 2a 1a fe e9 31 fe ff ff e8 23 4f ae fd 90 <0f> 0b 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 0f 1f 40 d6 RSP: 0018:ffffc9000de7e6d0 EFLAGS: 00010293 RAX: ffffffff84176f6d RBX: ffff888041817a80 RCX: ffff888033f90000 RDX: 0000000000000000 RSI: 00000000fffffff4 RDI: 0000000000000000 RBP: 0000000000001000 R08: 0000000000000820 R09: 00000000ffffffff R10: dffffc0000000000 R11: fffffbfff1d145fb R12: 0000000000000000 R13: ffffc9000de7e8b8 R14: 0000000000001000 R15: 00000000fffffff4 FS: 00007f5e54bcd6c0(0000) GS:ffff88808ca4c000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000055565ca5c5f8 CR3: 000000003912f000 CR4: 0000000000352ef0