From: Andrew Morton <akpm@linux-foundation.org>
To: mm-commits@vger.kernel.org,urezki@gmail.com,npiggin@gmail.com,dev.jain@arm.com,zhuhui@kylinos.cn,akpm@linux-foundation.org
Subject: [merged mm-stable] vmalloc-fix-null-pointer-dereference-in-is_vm_area_hugepages.patch removed from -mm tree
Date: Mon, 08 Jun 2026 18:22:50 -0700 [thread overview]
Message-ID: <20260609012250.A28241F00898@smtp.kernel.org> (raw)
The quilt patch titled
Subject: vmalloc: fix NULL pointer dereference in is_vm_area_hugepages()
has been removed from the -mm tree. Its filename was
vmalloc-fix-null-pointer-dereference-in-is_vm_area_hugepages.patch
This patch was dropped because it was merged into the mm-stable branch
of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
------------------------------------------------------
From: Hui Zhu <zhuhui@kylinos.cn>
Subject: vmalloc: fix NULL pointer dereference in is_vm_area_hugepages()
Date: Fri, 29 May 2026 09:41:30 +0800
find_vm_area() can return NULL if the given address is not a valid vmalloc
area. Check the return value before dereferencing it to avoid a kernel
crash.
Link: https://lore.kernel.org/20260529014130.671291-1-hui.zhu@linux.dev
Fixes: 121e6f3258fe ("mm/vmalloc: hugepage vmalloc mappings")
Signed-off-by: Hui Zhu <zhuhui@kylinos.cn>
Reviewed-by: Dev Jain <dev.jain@arm.com>
Reviewed-by: Uladzislau Rezki (Sony) <urezki@gmail.com>
Cc: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
include/linux/vmalloc.h | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
--- a/include/linux/vmalloc.h~vmalloc-fix-null-pointer-dereference-in-is_vm_area_hugepages
+++ a/include/linux/vmalloc.h
@@ -265,7 +265,9 @@ static inline bool is_vm_area_hugepages(
* allocated in the vmalloc layer.
*/
#ifdef CONFIG_HAVE_ARCH_HUGE_VMALLOC
- return find_vm_area(addr)->page_order > 0;
+ struct vm_struct *area = find_vm_area(addr);
+
+ return area && area->page_order > 0;
#else
return false;
#endif
_
Patches currently in -mm which might be from zhuhui@kylinos.cn are
reply other threads:[~2026-06-09 1:22 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20260609012250.A28241F00898@smtp.kernel.org \
--to=akpm@linux-foundation.org \
--cc=dev.jain@arm.com \
--cc=mm-commits@vger.kernel.org \
--cc=npiggin@gmail.com \
--cc=urezki@gmail.com \
--cc=zhuhui@kylinos.cn \
/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