From: syzbot <syzbot+42836f91edd58eb82c6a@syzkaller.appspotmail.com>
To: linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com
Subject: Forwarded: [PATCH] mm: Fix KASAN-induced recursive page faults in ptlock_ptr
Date: Mon, 26 Jan 2026 20:02:18 -0800 [thread overview]
Message-ID: <697838ca.050a0220.c9109.0010.GAE@google.com> (raw)
In-Reply-To: <69780fd2.050a0220.c9109.000a.GAE@google.com>
For archival purposes, forwarding an incoming command email to
linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com.
***
Subject: [PATCH] mm: Fix KASAN-induced recursive page faults in ptlock_ptr
Author: kartikey406@gmail.com
#syz test: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
When pte_offset_map_rw_nolock() is called during signal frame setup
in the ret_from_fork path, KASAN instrumentation of ptlock_ptr() can
trigger recursive page faults. The KASAN shadow memory access itself
may cause a page fault while already handling a page fault.
In RT priority contexts (SCHED_FIFO), this recursive faulting prevents
the task from yielding, causing RCU stalls as the grace period kthread
cannot get CPU time.
Disable KASAN instrumentation for both variants of ptlock_ptr() to
prevent this recursion.
Reported-by: syzbot+42836f91edd58eb82c6a@syzkaller.appspotmail.com
Link: https://syzkaller.appspot.com/bug?extid=42836f91edd58eb82c6a
Signed-off-by: Deepanshu Kartikey <kartikey406@gmail.com>
---
include/linux/mm.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/linux/mm.h b/include/linux/mm.h
index f0d5be9dc736..093ea042f973 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -3235,7 +3235,7 @@ void __init ptlock_cache_init(void);
bool ptlock_alloc(struct ptdesc *ptdesc);
void ptlock_free(struct ptdesc *ptdesc);
-static inline spinlock_t *ptlock_ptr(struct ptdesc *ptdesc)
+__no_sanitize_address static inline spinlock_t *ptlock_ptr(struct ptdesc *ptdesc)
{
return ptdesc->ptl;
}
@@ -3253,7 +3253,7 @@ static inline void ptlock_free(struct ptdesc *ptdesc)
{
}
-static inline spinlock_t *ptlock_ptr(struct ptdesc *ptdesc)
+__no_sanitize_address static inline spinlock_t *ptlock_ptr(struct ptdesc *ptdesc)
{
return &ptdesc->ptl;
}
--
2.43.0
prev parent reply other threads:[~2026-01-27 4:02 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-27 1:07 [syzbot] [mm?] INFO: rcu detected stall in schedule_tail (8) syzbot
2026-01-27 2:35 ` Forwarded: [PATCH] mm: Fix KASAN-induced recursive page faults in ptlock_ptr syzbot
2026-01-27 4:02 ` syzbot [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=697838ca.050a0220.c9109.0010.GAE@google.com \
--to=syzbot+42836f91edd58eb82c6a@syzkaller.appspotmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=syzkaller-bugs@googlegroups.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox