From: Hari Bathini <hbathini@linux.ibm.com> Date: 2018-06-28 05:20:08
Memory reservation for crashkernel could fail if there are holes around
kdump kernel offset (128M). Fail gracefully in such cases and print an
error message.
Signed-off-by: Hari Bathini <hbathini@linux.ibm.com>
---
arch/powerpc/kernel/machine_kexec.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
From: David Gibson <hidden> Date: 2018-06-28 05:33:12
On Thu, 28 Jun 2018 10:49:56 +0530
Hari Bathini [off-list ref] wrote:
Memory reservation for crashkernel could fail if there are holes around
kdump kernel offset (128M). Fail gracefully in such cases and print an
error message.
Signed-off-by: Hari Bathini <hbathini@linux.ibm.com>
From: Dave Young <hidden> Date: 2018-06-28 06:48:45
On 06/28/18 at 10:49am, Hari Bathini wrote:
quoted hunk
Memory reservation for crashkernel could fail if there are holes around
kdump kernel offset (128M). Fail gracefully in such cases and print an
error message.
Signed-off-by: Hari Bathini <hbathini@linux.ibm.com>
---
arch/powerpc/kernel/machine_kexec.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
@@ -188,7 +188,12 @@ void __init reserve_crashkernel(void)(unsignedlong)(crashk_res.start>>20),(unsignedlong)(memblock_phys_mem_size()>>20));-memblock_reserve(crashk_res.start,crash_size);+if(!memblock_is_region_memory(crashk_res.start,crash_size)||+memblock_reserve(crashk_res.start,crash_size)){+printk(KERN_ERR"Failed to reserve memory for crashkernel!\n");+crashk_res.start=crashk_res.end=0;+return;+}}intoverlaps_crashkernel(unsignedlongstart,unsignedlongsize)
It would be better to print a separate error message for !memblock_is_region_memory
But I think memblock_reserve is unlikly to fail so this patch is also
good.
Reviewed-by: Dave Young <redacted>
Thanks
Dave
From: Michael Ellerman <hidden> Date: 2018-07-19 06:07:38
On Thu, 2018-06-28 at 05:19:56 UTC, Hari Bathini wrote:
Memory reservation for crashkernel could fail if there are holes around
kdump kernel offset (128M). Fail gracefully in such cases and print an
error message.
Signed-off-by: Hari Bathini <hbathini@linux.ibm.com>
Tested-by: David Gibson <redacted>
Reviewed-by: Dave Young <redacted>