syzbot


BUG: sleeping function called from invalid context in getname_kernel

Status: upstream: reported C repro on 2024/10/09 13:48
Subsystems: btrfs
[Documentation on labels]
Reported-by: syzbot+02a127be2df04bdc5df0@syzkaller.appspotmail.com
First crash: 7d16h, last: 5d20h
Cause bisection: introduced by (bisect log) :
commit 94a5b169bf5c7c47d3b1af759cf70bf1ab236ddb
Author: Qu Wenruo <wqu@suse.com>
Date: Tue Sep 24 03:22:17 2024 +0000

  btrfs: avoid unnecessary device path update for the same device

Crash: BUG: sleeping function called from invalid context in getname_kernel (log)
Repro: C syz .config
  
Discussions (1)
Title Replies (including bot) Last reply
[syzbot] [btrfs?] BUG: sleeping function called from invalid context in getname_kernel 1 (4) 2024/10/10 13:02
Last patch testing requests (1)
Created Duration User Patch Repo Result
2024/10/09 23:21 24m quwenruo.btrfs@gmx.com https://github.com/adam900710/linux.git subpage_read OK log

Sample crash report:
BUG: sleeping function called from invalid context at include/linux/sched/mm.h:330
in_atomic(): 0, irqs_disabled(): 0, non_block: 0, pid: 5233, name: udevd
preempt_count: 0, expected: 0
RCU nest depth: 1, expected: 0
INFO: lockdep is turned off.
CPU: 1 UID: 0 PID: 5233 Comm: udevd Not tainted 6.12.0-rc2-next-20241008-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:94 [inline]
 dump_stack_lvl+0x241/0x360 lib/dump_stack.c:120
 __might_resched+0x5d4/0x780 kernel/sched/core.c:8638
 might_alloc include/linux/sched/mm.h:330 [inline]
 slab_pre_alloc_hook mm/slub.c:4062 [inline]
 slab_alloc_node mm/slub.c:4140 [inline]
 kmem_cache_alloc_noprof+0x61/0x380 mm/slub.c:4167
 getname_kernel+0x59/0x2f0 fs/namei.c:234
 kern_path+0x1d/0x50 fs/namei.c:2716
 is_same_device fs/btrfs/volumes.c:812 [inline]
 device_list_add+0xc64/0x1ea0 fs/btrfs/volumes.c:947
 btrfs_scan_one_device+0xab5/0xd90 fs/btrfs/volumes.c:1538
 btrfs_control_ioctl+0x165/0x3e0 fs/btrfs/super.c:2264
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:907 [inline]
 __se_sys_ioctl+0xf9/0x170 fs/ioctl.c:893
 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:0x7faa2bb1ad49
Code: 5c c3 48 8d 44 24 08 48 89 54 24 e0 48 89 44 24 c0 48 8d 44 24 d0 48 89 44 24 c8 b8 10 00 00 00 c7 44 24 b8 10 00 00 00 0f 05 <41> 89 c0 3d 00 f0 ff ff 76 10 48 8b 15 ae 60 0d 00 f7 d8 41 83 c8
RSP: 002b:00007ffd55ec91e8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007faa2bb1ad49
RDX: 00007ffd55ec91f8 RSI: 0000000090009427 RDI: 0000000000000009
RBP: 0000000000000009 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007ffd55eca238 R14: 000055773bb412a0 R15: 00007ffd55ecaf58
 </TASK>

Crashes (41):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/10/08 21:19 linux-next 33ce24234fca 402f1df0 .config strace log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-linux-next-kasan-gce-root BUG: sleeping function called from invalid context in getname_kernel
2024/10/10 04:24 linux-next 33ce24234fca 0278d004 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root BUG: sleeping function called from invalid context in getname_kernel
2024/10/10 04:21 linux-next 33ce24234fca 0278d004 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root BUG: sleeping function called from invalid context in getname_kernel
2024/10/10 04:21 linux-next 33ce24234fca 0278d004 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root BUG: sleeping function called from invalid context in getname_kernel
2024/10/10 04:03 linux-next 33ce24234fca 0278d004 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root BUG: sleeping function called from invalid context in getname_kernel
2024/10/09 22:32 linux-next 33ce24234fca 0278d004 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root BUG: sleeping function called from invalid context in getname_kernel
2024/10/09 22:32 linux-next 33ce24234fca 0278d004 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root BUG: sleeping function called from invalid context in getname_kernel
2024/10/09 22:20 linux-next 33ce24234fca 0278d004 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root BUG: sleeping function called from invalid context in getname_kernel
2024/10/09 21:15 linux-next 33ce24234fca 0278d004 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root BUG: sleeping function called from invalid context in getname_kernel
2024/10/09 20:11 linux-next 33ce24234fca 0278d004 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root BUG: sleeping function called from invalid context in getname_kernel
2024/10/09 20:10 linux-next 33ce24234fca 0278d004 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root BUG: sleeping function called from invalid context in getname_kernel
2024/10/09 16:41 linux-next 33ce24234fca 402f1df0 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root BUG: sleeping function called from invalid context in getname_kernel
2024/10/09 16:27 linux-next 33ce24234fca 402f1df0 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root BUG: sleeping function called from invalid context in getname_kernel
2024/10/09 14:24 linux-next 33ce24234fca 402f1df0 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root BUG: sleeping function called from invalid context in getname_kernel
2024/10/09 11:19 linux-next 33ce24234fca 402f1df0 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root BUG: sleeping function called from invalid context in getname_kernel
2024/10/09 09:52 linux-next 33ce24234fca 402f1df0 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root BUG: sleeping function called from invalid context in getname_kernel
2024/10/09 05:29 linux-next 33ce24234fca 402f1df0 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root BUG: sleeping function called from invalid context in getname_kernel
2024/10/08 18:28 linux-next 33ce24234fca 402f1df0 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root BUG: sleeping function called from invalid context in getname_kernel
2024/10/08 17:34 linux-next 33ce24234fca 402f1df0 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root BUG: sleeping function called from invalid context in getname_kernel
2024/10/08 17:34 linux-next 33ce24234fca 402f1df0 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root BUG: sleeping function called from invalid context in getname_kernel
2024/10/08 16:35 linux-next 33ce24234fca 402f1df0 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root BUG: sleeping function called from invalid context in getname_kernel
2024/10/08 12:14 linux-next 33ce24234fca 402f1df0 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root BUG: sleeping function called from invalid context in getname_kernel
2024/10/08 12:05 linux-next 33ce24234fca 402f1df0 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root BUG: sleeping function called from invalid context in getname_kernel
2024/10/08 12:02 linux-next 33ce24234fca 402f1df0 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root BUG: sleeping function called from invalid context in getname_kernel
2024/10/08 11:51 linux-next 33ce24234fca 402f1df0 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root BUG: sleeping function called from invalid context in getname_kernel
2024/10/08 11:39 linux-next 33ce24234fca 402f1df0 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root BUG: sleeping function called from invalid context in getname_kernel
2024/10/08 10:57 linux-next 33ce24234fca 402f1df0 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root BUG: sleeping function called from invalid context in getname_kernel
2024/10/08 10:56 linux-next 33ce24234fca 402f1df0 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root BUG: sleeping function called from invalid context in getname_kernel
2024/10/08 10:07 linux-next 33ce24234fca 402f1df0 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root BUG: sleeping function called from invalid context in getname_kernel
2024/10/08 10:05 linux-next 33ce24234fca 402f1df0 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root BUG: sleeping function called from invalid context in getname_kernel
2024/10/08 10:04 linux-next 33ce24234fca 402f1df0 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root BUG: sleeping function called from invalid context in getname_kernel
2024/10/08 09:47 linux-next 33ce24234fca 402f1df0 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root BUG: sleeping function called from invalid context in getname_kernel
2024/10/08 09:31 linux-next 33ce24234fca 402f1df0 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root BUG: sleeping function called from invalid context in getname_kernel
2024/10/08 09:31 linux-next 33ce24234fca 402f1df0 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root BUG: sleeping function called from invalid context in getname_kernel
2024/10/08 08:15 linux-next 33ce24234fca 402f1df0 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root BUG: sleeping function called from invalid context in getname_kernel
2024/10/08 07:59 linux-next 33ce24234fca 402f1df0 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root BUG: sleeping function called from invalid context in getname_kernel
2024/10/08 07:59 linux-next 33ce24234fca 402f1df0 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root BUG: sleeping function called from invalid context in getname_kernel
2024/10/08 07:58 linux-next 33ce24234fca 402f1df0 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root BUG: sleeping function called from invalid context in getname_kernel
2024/10/08 07:58 linux-next 33ce24234fca 402f1df0 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root BUG: sleeping function called from invalid context in getname_kernel
2024/10/08 07:51 linux-next 33ce24234fca 402f1df0 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root BUG: sleeping function called from invalid context in getname_kernel
2024/10/08 07:50 linux-next 33ce24234fca 402f1df0 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root BUG: sleeping function called from invalid context in getname_kernel
* Struck through repros no longer work on HEAD.