From: Andrew Morton <akpm@linux-foundation.org>
To: mm-commits@vger.kernel.org,urezki@gmail.com,azpijr@gmail.com,
liuye@kylinos.cn,akpm@linux-foundation.org
Subject: + mm-vmalloc-reject-null-pages-in-remap_vmalloc_range_partial.patch added to mm-unstable branch
Date: Sat, 21 Nov 2026 13:20:46 -0800 [thread overview]
Message-ID: <20261121212046.DC35A1F000C0@smtp.kernel.org> (raw)
In-Reply-To: <20261029-vmalloc_remap-v2-2-c4705cbf26c2@linux.dev>
The patch titled
Subject: mm/vmalloc: reject NULL pages in remap_vmalloc_range_partial
has been added to the -mm mm-unstable branch. Its filename is
mm-vmalloc-reject-null-pages-in-remap_vmalloc_range_partial.patch
This patch will shortly appear at
https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/mm-vmalloc-reject-null-pages-in-remap_vmalloc_range_partial.patch
This patch will later appear in the mm-unstable branch at
git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***
The -mm tree is included into linux-next via various
branches at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
and is updated there most days
------------------------------------------------------
From: Ye Liu <liuye@kylinos.cn>
Subject: mm/vmalloc: reject NULL pages in remap_vmalloc_range_partial
Date: Thu, 29 Oct 2026 17:19:08 +0800
remap_vmalloc_range_partial() passes vmalloc_to_page()'s result to
vm_insert_page() unchecked, oopsing via page_folio() on a NULL page.
The NULL case cannot happen today because VM_USERMAP areas keep every
page mapped, but nothing enforces that invariant. Warn once and fail
the mapping with -EINVAL instead of oopsing if it is ever broken.
Link: https://patch.msgid.link/20261029-vmalloc_remap-v2-2-c4705cbf26c2@linux.dev
Signed-off-by: Ye Liu <liuye@kylinos.cn>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Suggested-by: Jose A. Perez de Azpillaga <azpijr@gmail.com>
Reviewed-by: Jose A. Perez de Azpillaga <azpijr@gmail.com>
Cc: Uladzislau Rezki (Sony) <urezki@gmail.com>
mm/vmalloc.c | 3 +++
1 file changed, 3 insertions(+)
--- a/mm/vmalloc.c~mm-vmalloc-reject-null-pages-in-remap_vmalloc_range_partial
+++ a/mm/vmalloc.c
@@ -5064,6 +5064,9 @@ int remap_vmalloc_range_partial(struct v
struct page *page = vmalloc_to_page(kaddr);
int ret;
+ if (WARN_ON_ONCE(!page))
+ return -EINVAL;
+
ret = vm_insert_page(vma, uaddr, page);
if (ret)
return ret;
_
Patches currently in -mm which might be from liuye@kylinos.cn are
mm-vmalloc-drop-vm_dma_coherent-from-remap_vmalloc_range_partial.patch
mm-vmalloc-reject-null-pages-in-remap_vmalloc_range_partial.patch
parent reply other threads:[~2026-11-21 21:20 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <20261029-vmalloc_remap-v2-2-c4705cbf26c2@linux.dev>]
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=20261121212046.DC35A1F000C0@smtp.kernel.org \
--to=akpm@linux-foundation.org \
--cc=azpijr@gmail.com \
--cc=liuye@kylinos.cn \
--cc=mm-commits@vger.kernel.org \
--cc=urezki@gmail.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