syzbot


BUG: sleeping function called from invalid context in vm_area_dup

Status: fixed on 2023/02/24 13:50
Subsystems: kernel
[Documentation on labels]
Reported-by: syzbot+b910411d3d253dab25d8@syzkaller.appspotmail.com
Fix commit: d7c0e68dab98 mm/ksm: convert break_ksm() to use walk_page_range_vma()
First crash: 715d, last: 715d
Discussions (1)
Title Replies (including bot) Last reply
[syzbot] BUG: sleeping function called from invalid context in vm_area_dup 11 (13) 2022/10/24 04:52

Sample crash report:
BUG: sleeping function called from invalid context at include/linux/sched/mm.h:274
in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 3602, name: syz-executor107
preempt_count: 1, expected: 0
RCU nest depth: 0, expected: 0
INFO: lockdep is turned off.
Preemption disabled at:
[<0000000000000000>] 0x0
CPU: 0 PID: 3602 Comm: syz-executor107 Not tainted 6.1.0-rc1-next-20221020-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/22/2022
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:9890
 might_alloc include/linux/sched/mm.h:274 [inline]
 slab_pre_alloc_hook mm/slab.h:727 [inline]
 slab_alloc_node mm/slub.c:3323 [inline]
 slab_alloc mm/slub.c:3411 [inline]
 __kmem_cache_alloc_lru mm/slub.c:3418 [inline]
 kmem_cache_alloc+0x2e6/0x3c0 mm/slub.c:3427
 vm_area_dup+0x81/0x380 kernel/fork.c:466
 copy_vma+0x376/0x8d0 mm/mmap.c:3216
 move_vma+0x449/0xf60 mm/mremap.c:626
 __do_sys_mremap+0x487/0x16b0 mm/mremap.c:1075
 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:0x7fd090fa5b29
Code: 28 c3 e8 2a 14 00 00 66 2e 0f 1f 84 00 00 00 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 c0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffc2e90bd38 EFLAGS: 00000246 ORIG_RAX: 0000000000000019
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007fd090fa5b29
RDX: 0000000000001000 RSI: 0000000000004000 RDI: 00000000201c4000
RBP: 00007fd090f69cd0 R08: 00000000202ef000 R09: 0000000000000000
R10: 0000000000000003 R11: 0000000000000246 R12: 00007fd090f69d60
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
 </TASK>

Crashes (3):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2022/10/20 12:40 linux-next acee3e83b493 b31320fc .config strace log report syz C [disk image] [vmlinux] ci-upstream-linux-next-kasan-gce-root BUG: sleeping function called from invalid context in vm_area_dup
2022/10/20 11:51 linux-next acee3e83b493 b31320fc .config console log report info [disk image] [vmlinux] ci-upstream-linux-next-kasan-gce-root BUG: sleeping function called from invalid context in vm_area_dup
2022/10/20 11:49 linux-next acee3e83b493 b31320fc .config console log report info [disk image] [vmlinux] ci-upstream-linux-next-kasan-gce-root BUG: sleeping function called from invalid context in vm_area_dup
* Struck through repros no longer work on HEAD.