Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

powerpc/crash: preserve user-specified memory limit

Commit 59d58189f3d9 ("crash: fix crash memory reserve exceed system memory
bug") fails crashkernel parsing if the crash size is found to be higher
than system RAM, which makes the memory_limit adjustment code ineffective
due to an early exit from reserve_crashkernel().

Regardless lets not violate the user-specified memory limit by adjusting
it. Remove this adjustment to ensure all reservations stay within the
limit. Commit f94f5ac07983 ("powerpc/fadump: Don't update the
user-specified memory limit") did the same for fadump.

Link: https://lkml.kernel.org/r/20250131113830.925179-6-sourabhjain@linux.ibm.com
Signed-off-by: Sourabh Jain <sourabhjain@linux.ibm.com>
Reviewed-by: Mahesh Salgaonkar <mahesh@linux.ibm.com>
Acked-by: Hari Bathini <hbathini@linux.ibm.com>
Cc: Baoquan he <bhe@redhat.com>
Cc: Madhavan Srinivasan <maddy@linux.ibm.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

authored by

Sourabh Jain and committed by
Andrew Morton
021b5b30 6e5250ea

-8
-8
arch/powerpc/kexec/core.c
··· 128 128 return; 129 129 } 130 130 131 - /* Crash kernel trumps memory limit */ 132 - if (memory_limit && memory_limit <= crashk_res.end) { 133 - memory_limit = crashk_res.end + 1; 134 - total_mem_sz = memory_limit; 135 - printk("Adjusted memory limit for crashkernel, now 0x%llx\n", 136 - memory_limit); 137 - } 138 - 139 131 printk(KERN_INFO "Reserving %ldMB of memory at %ldMB " 140 132 "for crashkernel (System RAM: %ldMB)\n", 141 133 (unsigned long)(crash_size >> 20),