Message ID | 159057266320.22331.6571453892066907320.stgit@hbathini.in.ibm.com (mailing list archive) |
---|---|
State | Accepted |
Commit | 9a2921e5baca1d25eb8d21f21d1e90581a6d0f68 |
Headers | show |
Series | powerpc/fadump: account for memory_limit while reserving memory | expand |
Context | Check | Description |
---|---|---|
snowpatch_ozlabs/apply_patch | success | Successfully applied on branch powerpc/merge (fff0b48b2415d08f9bc09e9e596b916b3817862b) |
snowpatch_ozlabs/build-ppc64le | success | Build succeeded |
snowpatch_ozlabs/build-ppc64be | success | Build succeeded |
snowpatch_ozlabs/build-ppc64e | success | Build succeeded |
snowpatch_ozlabs/build-pmac32 | success | Build succeeded |
snowpatch_ozlabs/checkpatch | success | total: 0 errors, 0 warnings, 0 checks, 8 lines checked |
snowpatch_ozlabs/needsstable | success | Patch is tagged for stable |
On Wed, 27 May 2020 15:14:35 +0530, Hari Bathini wrote: > If the memory chunk found for reserving memory overshoots the memory > limit imposed, do not proceed with reserving memory. Default behavior > was this until commit 140777a3d8df ("powerpc/fadump: consider reserved > ranges while reserving memory") changed it unwittingly. Applied to powerpc/next. [1/1] powerpc/fadump: Account for memory_limit while reserving memory https://git.kernel.org/powerpc/c/9a2921e5baca1d25eb8d21f21d1e90581a6d0f68 cheers
diff --git a/arch/powerpc/kernel/fadump.c b/arch/powerpc/kernel/fadump.c index 63aac8b..78ab9a6 100644 --- a/arch/powerpc/kernel/fadump.c +++ b/arch/powerpc/kernel/fadump.c @@ -603,7 +603,7 @@ int __init fadump_reserve_mem(void) */ 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"); goto error_out; }
If the memory chunk found for reserving memory overshoots the memory limit imposed, do not proceed with reserving memory. Default behavior was this until commit 140777a3d8df ("powerpc/fadump: consider reserved ranges while reserving memory") changed it unwittingly. Reported-by: kbuild test robot <lkp@intel.com> Fixes: 140777a3d8df ("powerpc/fadump: consider reserved ranges while reserving memory") Cc: stable@vger.kernel.org Signed-off-by: Hari Bathini <hbathini@linux.ibm.com> --- For reference: - https://lists.ozlabs.org/pipermail/linuxppc-dev/2020-May/211136.html arch/powerpc/kernel/fadump.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)