* [syzbot] [mm?] BUG: sleeping function called from invalid context in __zap_vma_range
@ 2026-04-20 21:36 syzbot
2026-04-21 13:30 ` Pedro Falcato
0 siblings, 1 reply; 2+ messages in thread
From: syzbot @ 2026-04-20 21:36 UTC (permalink / raw)
To: Liam.Howlett, akpm, jannh, linux-kernel, linux-mm, ljs, pfalcato,
syzkaller-bugs, vbabka
Hello,
syzbot found the following issue on:
HEAD commit: c1f49dea2b8f Merge tag 'mm-hotfixes-stable-2026-04-19-00-1..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=142514ce580000
kernel config: https://syzkaller.appspot.com/x/.config?x=6a29a582d8ced859
dashboard link: https://syzkaller.appspot.com/bug?extid=4cc5bc01fb4a179c4ffa
compiler: gcc (Debian 14.2.0-19) 14.2.0, GNU ld (GNU Binutils for Debian) 2.44
Unfortunately, I don't have any reproducer for this issue yet.
Downloadable assets:
disk image (non-bootable): https://storage.googleapis.com/syzbot-assets/d900f083ada3/non_bootable_disk-c1f49dea.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/402c79548d6e/vmlinux-c1f49dea.xz
kernel image: https://storage.googleapis.com/syzbot-assets/1bc39526d7f4/bzImage-c1f49dea.xz
IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+4cc5bc01fb4a179c4ffa@syzkaller.appspotmail.com
BUG: sleeping function called from invalid context at mm/memory.c:2007
in_atomic(): 0, irqs_disabled(): 0, non_block: 0, pid: 5913, name: cmp
preempt_count: 0, expected: 0
RCU nest depth: 1, expected: 0
2 locks held by cmp/5913:
#0: ffff88801b8cc078 (&mm->mmap_lock){++++}-{4:4}, at: mmap_read_lock include/linux/mmap_lock.h:592 [inline]
#0: ffff88801b8cc078 (&mm->mmap_lock){++++}-{4:4}, at: exit_mmap+0x124/0xa10 mm/mmap.c:1284
#1: ffffffff8e7e5460 (rcu_read_lock){....}-{1:3}, at: rcu_lock_acquire include/linux/rcupdate.h:300 [inline]
#1: ffffffff8e7e5460 (rcu_read_lock){....}-{1:3}, at: rcu_read_lock include/linux/rcupdate.h:838 [inline]
#1: ffffffff8e7e5460 (rcu_read_lock){....}-{1:3}, at: __pte_offset_map+0x2f/0x310 mm/pgtable-generic.c:290
CPU: 3 UID: 0 PID: 5913 Comm: cmp 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
zap_pmd_range mm/memory.c:2007 [inline]
zap_pud_range mm/memory.c:2032 [inline]
zap_p4d_range mm/memory.c:2053 [inline]
__zap_vma_range+0x184b/0x4bf0 mm/memory.c:2093
unmap_vmas+0x299/0x5f0 mm/memory.c:2162
exit_mmap+0x1ef/0xa10 mm/mmap.c:1300
__mmput+0x12a/0x410 kernel/fork.c:1178
mmput+0x67/0x80 kernel/fork.c:1201
exit_mm kernel/exit.c:581 [inline]
do_exit+0x833/0x2a60 kernel/exit.c:963
do_group_exit+0xd5/0x2a0 kernel/exit.c:1117
__do_sys_exit_group kernel/exit.c:1128 [inline]
__se_sys_exit_group kernel/exit.c:1126 [inline]
__x64_sys_exit_group+0x3e/0x50 kernel/exit.c:1126
x64_sys_call+0x102c/0x1530 arch/x86/include/generated/asm/syscalls_64.h:232
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0x10b/0xf80 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7fedcf5c96c5
Code: Unable to access opcode bytes at 0x7fedcf5c969b.
RSP: 002b:00007ffd9f5f73c8 EFLAGS: 00000202 ORIG_RAX: 00000000000000e7
RAX: ffffffffffffffda RBX: 00007fedcf6cafe8 RCX: 00007fedcf5c96c5
RDX: 00000000000000e7 RSI: ffffffffffffff88 RDI: 0000000000000000
RBP: 0000000000000001 R08: 00007ffd9f5f7358 R09: 0000000000000000
R10: 00007ffd9f5f71f0 R11: 0000000000000202 R12: 0000000000000000
R13: 0000000000000000 R14: 00007fedcf6c9680 R15: 00007fedcf6cb000
</TASK>
=============================
[ BUG: Invalid wait context ]
syzkaller #0 Tainted: G W
-----------------------------
cmp/5913 is trying to lock:
ffff88801b8cc078 (&mm->mmap_lock){++++}-{4:4}, at: mmap_write_lock include/linux/mmap_lock.h:536 [inline]
ffff88801b8cc078 (&mm->mmap_lock){++++}-{4:4}, at: exit_mmap+0x22c/0xa10 mm/mmap.c:1308
other info that might help us debug this:
context-{5:5}
1 lock held by cmp/5913:
#0: ffffffff8e7e5460 (rcu_read_lock){....}-{1:3}, at: rcu_lock_acquire include/linux/rcupdate.h:300 [inline]
#0: ffffffff8e7e5460 (rcu_read_lock){....}-{1:3}, at: rcu_read_lock include/linux/rcupdate.h:838 [inline]
#0: ffffffff8e7e5460 (rcu_read_lock){....}-{1:3}, at: __pte_offset_map+0x2f/0x310 mm/pgtable-generic.c:290
stack backtrace:
CPU: 3 UID: 0 PID: 5913 Comm: cmp Tainted: G W syzkaller #0 PREEMPT(full)
Tainted: [W]=WARN
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
print_lock_invalid_wait_context kernel/locking/lockdep.c:4830 [inline]
check_wait_context kernel/locking/lockdep.c:4902 [inline]
__lock_acquire+0xfa4/0x2630 kernel/locking/lockdep.c:5187
lock_acquire kernel/locking/lockdep.c:5868 [inline]
lock_acquire+0x1b1/0x370 kernel/locking/lockdep.c:5825
down_write+0x8b/0x1f0 kernel/locking/rwsem.c:1625
mmap_write_lock include/linux/mmap_lock.h:536 [inline]
exit_mmap+0x22c/0xa10 mm/mmap.c:1308
__mmput+0x12a/0x410 kernel/fork.c:1178
mmput+0x67/0x80 kernel/fork.c:1201
exit_mm kernel/exit.c:581 [inline]
do_exit+0x833/0x2a60 kernel/exit.c:963
do_group_exit+0xd5/0x2a0 kernel/exit.c:1117
__do_sys_exit_group kernel/exit.c:1128 [inline]
__se_sys_exit_group kernel/exit.c:1126 [inline]
__x64_sys_exit_group+0x3e/0x50 kernel/exit.c:1126
x64_sys_call+0x102c/0x1530 arch/x86/include/generated/asm/syscalls_64.h:232
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0x10b/0xf80 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7fedcf5c96c5
Code: Unable to access opcode bytes at 0x7fedcf5c969b.
RSP: 002b:00007ffd9f5f73c8 EFLAGS: 00000202 ORIG_RAX: 00000000000000e7
RAX: ffffffffffffffda RBX: 00007fedcf6cafe8 RCX: 00007fedcf5c96c5
RDX: 00000000000000e7 RSI: ffffffffffffff88 RDI: 0000000000000000
RBP: 0000000000000001 R08: 00007ffd9f5f7358 R09: 0000000000000000
R10: 00007ffd9f5f71f0 R11: 0000000000000202 R12: 0000000000000000
R13: 0000000000000000 R14: 00007fedcf6c9680 R15: 00007fedcf6cb000
</TASK>
---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzkaller@googlegroups.com.
syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.
If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title
If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)
If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report
If you want to undo deduplication, reply with:
#syz undup
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [syzbot] [mm?] BUG: sleeping function called from invalid context in __zap_vma_range
2026-04-20 21:36 [syzbot] [mm?] BUG: sleeping function called from invalid context in __zap_vma_range syzbot
@ 2026-04-21 13:30 ` Pedro Falcato
0 siblings, 0 replies; 2+ messages in thread
From: Pedro Falcato @ 2026-04-21 13:30 UTC (permalink / raw)
To: syzbot
Cc: Liam.Howlett, akpm, jannh, linux-kernel, linux-mm, ljs,
syzkaller-bugs, vbabka
On Mon, Apr 20, 2026 at 02:36:21PM -0700, syzbot wrote:
> Hello,
>
> syzbot found the following issue on:
>
> HEAD commit: c1f49dea2b8f Merge tag 'mm-hotfixes-stable-2026-04-19-00-1..
> git tree: upstream
> console output: https://syzkaller.appspot.com/x/log.txt?x=142514ce580000
> kernel config: https://syzkaller.appspot.com/x/.config?x=6a29a582d8ced859
> dashboard link: https://syzkaller.appspot.com/bug?extid=4cc5bc01fb4a179c4ffa
> compiler: gcc (Debian 14.2.0-19) 14.2.0, GNU ld (GNU Binutils for Debian) 2.44
>
> Unfortunately, I don't have any reproducer for this issue yet.
>
> Downloadable assets:
> disk image (non-bootable): https://storage.googleapis.com/syzbot-assets/d900f083ada3/non_bootable_disk-c1f49dea.raw.xz
> vmlinux: https://storage.googleapis.com/syzbot-assets/402c79548d6e/vmlinux-c1f49dea.xz
> kernel image: https://storage.googleapis.com/syzbot-assets/1bc39526d7f4/bzImage-c1f49dea.xz
>
> IMPORTANT: if you fix the issue, please add the following tag to the commit:
> Reported-by: syzbot+4cc5bc01fb4a179c4ffa@syzkaller.appspotmail.com
>
> BUG: sleeping function called from invalid context at mm/memory.c:2007
> in_atomic(): 0, irqs_disabled(): 0, non_block: 0, pid: 5913, name: cmp
> preempt_count: 0, expected: 0
> RCU nest depth: 1, expected: 0
> 2 locks held by cmp/5913:
> #0: ffff88801b8cc078 (&mm->mmap_lock){++++}-{4:4}, at: mmap_read_lock include/linux/mmap_lock.h:592 [inline]
> #0: ffff88801b8cc078 (&mm->mmap_lock){++++}-{4:4}, at: exit_mmap+0x124/0xa10 mm/mmap.c:1284
> #1: ffffffff8e7e5460 (rcu_read_lock){....}-{1:3}, at: rcu_lock_acquire include/linux/rcupdate.h:300 [inline]
> #1: ffffffff8e7e5460 (rcu_read_lock){....}-{1:3}, at: rcu_read_lock include/linux/rcupdate.h:838 [inline]
> #1: ffffffff8e7e5460 (rcu_read_lock){....}-{1:3}, at: __pte_offset_map+0x2f/0x310 mm/pgtable-generic.c:290
This first looked to me like some spot where we forgot to unmap the PTE, but a
closer look suggests that, since we no longer hold the pte lock, something
forgot to unlock the rcu lock and we're just seeing the lock nesting in action.
Possibly related to the swap rework or so? I dunno. Hard to guess without
more clues. I tried looking at the mm changes for the cycle but nothing
seemed to pop out to me.
--
Pedro
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-04-21 13:30 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-20 21:36 [syzbot] [mm?] BUG: sleeping function called from invalid context in __zap_vma_range syzbot
2026-04-21 13:30 ` Pedro Falcato
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox