mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-06 18:09:56 +00:00
powerpc/fadump: Account for memory_limit while reserving memory
commit9a2921e5baupstream. If the memory chunk found for reserving memory overshoots the memory limit imposed, do not proceed with reserving memory. Default behavior was this until commit140777a3d8("powerpc/fadump: consider reserved ranges while reserving memory") changed it unwittingly. Fixes:140777a3d8("powerpc/fadump: consider reserved ranges while reserving memory") Cc: stable@vger.kernel.org Reported-by: kbuild test robot <lkp@intel.com> Signed-off-by: Hari Bathini <hbathini@linux.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/159057266320.22331.6571453892066907320.stgit@hbathini.in.ibm.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
d544d3a254
commit
2d19fdf476
@@ -603,7 +603,7 @@ int __init fadump_reserve_mem(void)
|
|||||||
*/
|
*/
|
||||||
base = fadump_locate_reserve_mem(base, size);
|
base = fadump_locate_reserve_mem(base, size);
|
||||||
|
|
||||||
if (!base) {
|
if (!base || (base + size > mem_boundary)) {
|
||||||
pr_err("Failed to find memory chunk for reservation!\n");
|
pr_err("Failed to find memory chunk for reservation!\n");
|
||||||
goto error_out;
|
goto error_out;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user