syzbot


BUG: sleeping function called from invalid context in getname_kernel

Status: auto-obsoleted due to no activity on 2024/11/19 04:25
Subsystems: btrfs
[Documentation on labels]
Reported-by: syzbot+02a127be2df04bdc5df0@syzkaller.appspotmail.com
First crash: 74d, last: 72d
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 (2)
Created Duration User Patch Repo Result
2024/10/24 07:49 21m retest repro linux-next OK log
2024/10/09 23:21 24m quwenruo.btrfs@gmx.com https://github.com/adam900710/linux.git subpage_read OK log

Sample crash report:
loop3: detected capacity change from 0 to 32768
BUG: sleeping function called from invalid context at include/linux/sched/mm.h:330
in_atomic(): 0, irqs_disabled(): 0, non_block: 0, pid: 6081, name: syz.3.135
preempt_count: 0, expected: 0
RCU nest depth: 1, expected: 0
INFO: lockdep is turned off.
CPU: 0 UID: 0 PID: 6081 Comm: syz.3.135 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_get_tree_super fs/btrfs/super.c:1841 [inline]
 btrfs_get_tree+0x30e/0x1920 fs/btrfs/super.c:2114
 vfs_get_tree+0x90/0x2b0 fs/super.c:1800
 fc_mount+0x1b/0xb0 fs/namespace.c:1231
 btrfs_get_tree_subvol fs/btrfs/super.c:2077 [inline]
 btrfs_get_tree+0x652/0x1920 fs/btrfs/super.c:2115
 vfs_get_tree+0x90/0x2b0 fs/super.c:1800
 do_new_mount+0x2be/0xb40 fs/namespace.c:3507
 do_mount fs/namespace.c:3847 [inline]
 __do_sys_mount fs/namespace.c:4055 [inline]
 __se_sys_mount+0x2d6/0x3c0 fs/namespace.c:4032
 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:0x7f061097f79a
Code: d8 64 89 02 48 c7 c0 ff ff ff ff eb a6 e8 de 1a 00 00 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 49 89 ca b8 a5 00 00 00 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:00007f06116cfe68 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 00007f06116cfef0 RCX: 00007f061097f79a
RDX: 0000000020000080 RSI: 0000000020000040 RDI: 00007f06116cfeb0
RBP: 0000000020000080 R08: 00007f06116cfef0 R09: 000000000001c005
R10: 000000000001c005 R11: 0000000000000246 R12: 0000000020000040
R13: 00007f06116cfeb0 R14: 00000000000055de R15: 00000000200002c0
 </TASK>
BTRFS info (device loop3 state S): first mount of filesystem a6a605fc-d5f1-4e66-8595-3726e2b761d6
BTRFS info (device loop3 state S): using blake2b (blake2b-256-generic) checksum algorithm
BTRFS info (device loop3 state S): using free-space-tree
BTRFS warning (device loop3 state S): couldn't read tree root
BTRFS warning (device loop3 state S): try to load backup roots slot 1
BTRFS error (device loop3 state S): dev extent devid 1 physical offset 1048576 len 4194304 is beyond device boundary 0
BTRFS error (device loop3 state S): failed to verify dev extents against chunks: -117
BTRFS error (device loop3 state S): open_ctree failed
loop3: detected capacity change from 0 to 32768
BTRFS: device fsid a6a605fc-d5f1-4e66-8595-3726e2b761d6 devid 72057594037927935 transid 8 /dev/loop3 (7:3) scanned by syz.3.135 (6081)
BTRFS info (device loop3): first mount of filesystem a6a605fc-d5f1-4e66-8595-3726e2b761d6
BTRFS info (device loop3): using blake2b (blake2b-256-generic) checksum algorithm
BTRFS error (device loop3): superblock checksum mismatch
BTRFS error (device loop3): open_ctree failed

Crashes (41):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
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 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/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.