diff options
| author | Muchun Song <songmuchun@bytedance.com> | 2026-06-12 11:58:50 +0800 |
|---|---|---|
| committer | Andrew Morton <akpm@linux-foundation.org> | 2026-07-08 22:53:56 -0700 |
| commit | b822187b341781a991c443d76ed9dd2101ec2944 (patch) | |
| tree | 10d46d4570e162cf33af6dd56e3b55f9ed5fafdc /scripts/git.orderFile | |
| parent | cf5a795ec5fbd3d6ebdeb9cf8db8b8a7ccc5e6d9 (diff) | |
| download | linux-next-b822187b341781a991c443d76ed9dd2101ec2944.tar.gz linux-next-b822187b341781a991c443d76ed9dd2101ec2944.zip | |
mm/sparse: panic on memmap and usemap allocation failure
When vmemmap or usemap allocation fails, sparse_init_nid() currently marks
the section non-present and continues. Later boot-time code can still
walk PFNs in that section without checking for this partial setup, which
leads to invalid accesses. subsection_map_init() can also touch an
unallocated usemap.
Auditing and fixing all early PFN walkers for this case is not worth the
complexity. These allocation failures are expected to be fatal anyway,
and other memory models already treat them that way.
Make memmap and usemap allocation failures panic immediately instead of
trying to recover and crashing later in less obvious ways. This is also
consistent with how other memory model configurations handle memmap
allocation failures.
Link: https://lore.kernel.org/20260612035903.2468601-7-songmuchun@bytedance.com
Signed-off-by: Muchun Song <songmuchun@bytedance.com>
Acked-by: Mike Rapoport (Microsoft) <rppt@kernel.org>
Acked-by: Oscar Salvador <osalvador@suse.de>
Cc: "Aneesh Kumar K.V" <aneesh.kumar@linux.ibm.com>
Cc: David Hildenbrand <david@kernel.org>
Cc: Frank van der Linden <fvdl@google.com>
Cc: Liam R. Howlett <liam@infradead.org>
Cc: Lorenzo Stoakes <ljs@kernel.org>
Cc: Madhavan Srinivasan <maddy@linux.ibm.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Nicholas Piggin <npiggin@gmail.com>
Cc: Oscar Salvador (SUSE) <osalvador@kernel.org>
Cc: "Ritesh Harjani (IBM)" <ritesh.list@gmail.com>
Cc: Usama Arif <usama.arif@linux.dev>
Cc: Vlastimil Babka <vbabka@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'scripts/git.orderFile')
0 files changed, 0 insertions, 0 deletions
