syzbot


BUG: sleeping function called from invalid context in vma_alloc_folio_noprof (2)

Status: upstream: reported on 2026/05/03 11:47
Subsystems: mm
[Documentation on labels]
Reported-by: syzbot+a21650c1666eae7b2aae@syzkaller.appspotmail.com
First crash: 5d03h, last: 5d03h
Discussions (1)
Title Replies (including bot) Last reply
[syzbot] [mm?] BUG: sleeping function called from invalid context in vma_alloc_folio_noprof (2) 1 (2) 2026/05/04 00:13
Similar bugs (1)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream BUG: sleeping function called from invalid context in vma_alloc_folio_noprof mm 5 C done 1 658d 657d 27/29 fixed on 2024/08/14 03:44

Sample crash report:
BUG: sleeping function called from invalid context at ./include/linux/sched/mm.h:323
in_atomic(): 0, irqs_disabled(): 0, non_block: 0, pid: 5665, name: dhcpcd-run-hook
preempt_count: 0, expected: 0
RCU nest depth: 1, expected: 0
2 locks held by dhcpcd-run-hook/5665:
 #0: ffff8880243d01c8 (vm_lock){++++}-{0:0}, at: lock_vma_under_rcu+0x11d/0x590 mm/mmap_lock.c:310
 #1: ffffffff8e7e52e0 (rcu_read_lock){....}-{1:3}, at: rcu_lock_acquire include/linux/rcupdate.h:300 [inline]
 #1: ffffffff8e7e52e0 (rcu_read_lock){....}-{1:3}, at: rcu_read_lock include/linux/rcupdate.h:838 [inline]
 #1: ffffffff8e7e52e0 (rcu_read_lock){....}-{1:3}, at: __pte_offset_map+0x2f/0x310 mm/pgtable-generic.c:290
CPU: 0 UID: 0 PID: 5665 Comm: dhcpcd-run-hook 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:
 <TASK>
 __dump_stack lib/dump_stack.c:94 [inline]
 dump_stack_lvl+0x100/0x190 lib/dump_stack.c:120
 __might_resched.cold+0x1ec/0x232 kernel/sched/core.c:9162
 might_alloc include/linux/sched/mm.h:323 [inline]
 prepare_alloc_pages+0x44a/0x5f0 mm/page_alloc.c:4995
 __alloc_frozen_pages_noprof+0x19a/0x2bc0 mm/page_alloc.c:5215
 alloc_pages_mpol+0x1fb/0x540 mm/mempolicy.c:2490
 folio_alloc_mpol_noprof+0x36/0x260 mm/mempolicy.c:2509
 vma_alloc_folio_noprof+0xed/0x1d0 mm/mempolicy.c:2544
 folio_prealloc mm/memory.c:1193 [inline]
 wp_page_copy mm/memory.c:3859 [inline]
 do_wp_page+0x1ee1/0x4350 mm/memory.c:4320
 handle_pte_fault mm/memory.c:6427 [inline]
 __handle_mm_fault+0x1ab6/0x2a00 mm/memory.c:6549
 handle_mm_fault+0x36d/0xa20 mm/memory.c:6718
 do_user_addr_fault+0x5a3/0x12f0 arch/x86/mm/fault.c:1334
 handle_page_fault arch/x86/mm/fault.c:1474 [inline]
 exc_page_fault+0x6f/0xd0 arch/x86/mm/fault.c:1527
 asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:618
RIP: 0033:0x7f5a6f60980e
Code: df e8 d7 c4 ff ff 48 8d 3d 9c 92 05 00 31 c0 e8 e1 ca ff ff 95 75 24 48 8d 05 5e 9c 07 00 44 89 f2 4c 89 e6 48 89 df 48 8b 00 <83> a0 f8 02 00 00 00 e8 de eb ff ff e9 a8 00 00 00 48 85 db 0f 84
RSP: 002b:00007ffc0b5c63f0 EFLAGS: 00010246
RAX: 000055c4ea134910 RBX: 000055c4ea135c60 RCX: 0000000000000000
RDX: 0000000000000000 RSI: 000055c4ea138c30 RDI: 000055c4ea135c60
RBP: 0000000000000000 R08: 00007f5a6f5b4b60 R09: 0000000000000000
R10: 0000000000000008 R11: 0000000000000246 R12: 000055c4ea138c30
R13: 000055c4ea135c60 R14: 0000000000000000 R15: 0000000000000000
 </TASK>

================================================
WARNING: lock held when returning to user space!
syzkaller #0 Tainted: G        W          
------------------------------------------------
dhcpcd-run-hook/5665 is leaving the kernel with locks still held!
1 lock held by dhcpcd-run-hook/5665:
 #0: ffffffff8e7e52e0 (rcu_read_lock){....}-{1:3}, at: rcu_lock_acquire include/linux/rcupdate.h:300 [inline]
 #0: ffffffff8e7e52e0 (rcu_read_lock){....}-{1:3}, at: rcu_read_lock include/linux/rcupdate.h:838 [inline]
 #0: ffffffff8e7e52e0 (rcu_read_lock){....}-{1:3}, at: __pte_offset_map+0x2f/0x310 mm/pgtable-generic.c:290

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/04/29 11:43 upstream dca922e019dd 7ca9e4d8 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 BUG: sleeping function called from invalid context in vma_alloc_folio_noprof
* Struck through repros no longer work on HEAD.