* [PATCH] powerpc/fadump: account for memory_limit while reserving memory
@ 2020-05-27 9:44 Hari Bathini
2020-06-09 5:28 ` Michael Ellerman
0 siblings, 1 reply; 2+ messages in thread
From: Hari Bathini @ 2020-05-27 9:44 UTC (permalink / raw)
To: Michael Ellerman, linuxppc-dev
Cc: stable, Mahesh J Salgaonkar, Vasant Hegde, Sourabh Jain,
kbuild test robot
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(-)
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;
}
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] powerpc/fadump: account for memory_limit while reserving memory
2020-05-27 9:44 [PATCH] powerpc/fadump: account for memory_limit while reserving memory Hari Bathini
@ 2020-06-09 5:28 ` Michael Ellerman
0 siblings, 0 replies; 2+ messages in thread
From: Michael Ellerman @ 2020-06-09 5:28 UTC (permalink / raw)
To: linuxppc-dev, Michael Ellerman, Hari Bathini
Cc: Sourabh Jain, stable, Mahesh J Salgaonkar, Vasant Hegde,
kbuild test robot
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-06-09 6:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-05-27 9:44 [PATCH] powerpc/fadump: account for memory_limit while reserving memory Hari Bathini
2020-06-09 5:28 ` Michael Ellerman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).