syzbot


BUG: sleeping function called from invalid context in __xas_nomem

Status: auto-obsoleted due to no activity on 2022/11/25 11:06
Reported-by: syzbot+b355e80670ac28f5263c@syzkaller.appspotmail.com
First crash: 141d, last: 123d

Sample crash report:
BTRFS info (device loop0): disk space caching is enabled
BTRFS info (device loop0): has skinny extents
BTRFS info (device loop0): enabling ssd optimizations
BUG: sleeping function called from invalid context at include/linux/sched/mm.h:274
in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 4529, name: syz-executor.0
preempt_count: 1, expected: 0
RCU nest depth: 0, expected: 0
2 locks held by syz-executor.0/4529:
 #0: ffff888074c5a0e0 (&type->s_umount_key#66/1){+.+.}-{3:3}, at: alloc_super+0x1dd/0xa80 fs/super.c:228
 #1: ffff8880777380c0 (&fs_info->fs_roots_lock){+.+.}-{2:2}, at: spin_lock include/linux/spinlock.h:349 [inline]
 #1: ffff8880777380c0 (&fs_info->fs_roots_lock){+.+.}-{2:2}, at: btrfs_insert_fs_root+0x78/0x2e0 fs/btrfs/disk-io.c:1708
Preemption disabled at:
[<0000000000000000>] 0x0
CPU: 3 PID: 4529 Comm: syz-executor.0 Not tainted 5.19.0-rc6-syzkaller-00115-g4a57a8400075 #0
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.14.0-2 04/01/2014
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0xcd/0x134 lib/dump_stack.c:106
 __might_resched.cold+0x222/0x26b kernel/sched/core.c:9821
 might_alloc include/linux/sched/mm.h:274 [inline]
 slab_pre_alloc_hook mm/slab.h:723 [inline]
 slab_alloc mm/slab.c:3285 [inline]
 __kmem_cache_alloc_lru mm/slab.c:3479 [inline]
 kmem_cache_alloc_lru+0x41b/0x8c0 mm/slab.c:3506
 __xas_nomem+0x263/0x670 lib/xarray.c:340
 __xa_insert+0x122/0x250 lib/xarray.c:1662
 xa_insert include/linux/xarray.h:774 [inline]
 btrfs_insert_fs_root+0xf7/0x2e0 fs/btrfs/disk-io.c:1709
 btrfs_get_root_ref.part.0+0x820/0xb80 fs/btrfs/disk-io.c:1855
 btrfs_get_root_ref fs/btrfs/disk-io.c:1809 [inline]
 btrfs_get_fs_root fs/btrfs/disk-io.c:1887 [inline]
 open_ctree+0x3fa2/0x49d3 fs/btrfs/disk-io.c:3883
 btrfs_fill_super fs/btrfs/super.c:1455 [inline]
 btrfs_mount_root.cold+0x15/0x162 fs/btrfs/super.c:1821
 legacy_get_tree+0x105/0x220 fs/fs_context.c:610
 vfs_get_tree+0x89/0x2f0 fs/super.c:1497
 fc_mount fs/namespace.c:1043 [inline]
 vfs_kern_mount.part.0+0xd3/0x170 fs/namespace.c:1073
 vfs_kern_mount+0x3c/0x60 fs/namespace.c:1060
 btrfs_mount+0x234/0xa60 fs/btrfs/super.c:1881
 legacy_get_tree+0x105/0x220 fs/fs_context.c:610
 vfs_get_tree+0x89/0x2f0 fs/super.c:1497
 do_new_mount fs/namespace.c:3040 [inline]
 path_mount+0x1320/0x1fa0 fs/namespace.c:3370
 do_mount fs/namespace.c:3383 [inline]
 __do_sys_mount fs/namespace.c:3591 [inline]
 __se_sys_mount fs/namespace.c:3568 [inline]
 __x64_sys_mount+0x27f/0x300 fs/namespace.c:3568
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7fa396e8a73a
Code: 48 c7 c2 b8 ff ff ff f7 d8 64 89 02 b8 ff ff ff ff eb d2 e8 b8 04 00 00 0f 1f 84 00 00 00 00 00 49 89 ca b8 a5 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fa39805df88 EFLAGS: 00000206 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 0000000020000200 RCX: 00007fa396e8a73a
RDX: 0000000020000000 RSI: 0000000020000100 RDI: 00007fa39805dfe0
RBP: 00007fa39805e020 R08: 00007fa39805e020 R09: 0000000020000000
R10: 0000000000000000 R11: 0000000000000206 R12: 0000000020000000
R13: 0000000020000100 R14: 00007fa39805dfe0 R15: 0000000020020400
 </TASK>

Crashes (7):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci-qemu-upstream 2022/07/28 11:06 upstream 4a57a8400075 fb95c74d .config log report info BUG: sleeping function called from invalid context in __xas_nomem
ci-qemu-upstream 2022/07/27 19:49 upstream 4a57a8400075 da9d0366 .config log report info BUG: sleeping function called from invalid context in __xas_nomem
ci-qemu-upstream 2022/07/26 18:19 upstream 4a57a8400075 279b89c2 .config log report info BUG: sleeping function called from invalid context in __xas_nomem
ci-qemu-upstream 2022/07/26 13:04 upstream 4a57a8400075 279b89c2 .config log report info BUG: sleeping function called from invalid context in __xas_nomem
ci-qemu-upstream 2022/07/13 01:16 upstream 5a29232d870d d91dd8ea .config log report info BUG: sleeping function called from invalid context in __xas_nomem
ci-qemu-upstream 2022/07/12 01:25 upstream 8e59a6a7a4fa da3d6955 .config log report info BUG: sleeping function called from invalid context in __xas_nomem
ci-qemu-upstream 2022/07/10 02:21 upstream b1c428b6c368 b5765a15 .config log report info BUG: sleeping function called from invalid context in __xas_nomem
* Struck through repros no longer work on HEAD.