projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
741c564
)
powerpc/kdump: Handle crashkernel memory reservation failure
author
Hari Bathini
<
[email protected]
>
Thu, 28 Jun 2018 05:19:56 +0000
(10:49 +0530)
committer
Michael Ellerman
<
[email protected]
>
Wed, 4 Jul 2018 12:40:24 +0000
(22:40 +1000)
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 <
[email protected]
>
Tested-by: David Gibson <
[email protected]
>
Reviewed-by: Dave Young <
[email protected]
>
Signed-off-by: Michael Ellerman <
[email protected]
>
arch/powerpc/kernel/machine_kexec.c
patch
|
blob
|
history
diff --git
a/arch/powerpc/kernel/machine_kexec.c
b/arch/powerpc/kernel/machine_kexec.c
index 936c7e2d421e7b5fa6eab58b20d4fbc7fd7d5fd7..b53401334e81b5fbfed75605922afcb1f4f8d5b6 100644
(file)
--- a/
arch/powerpc/kernel/machine_kexec.c
+++ b/
arch/powerpc/kernel/machine_kexec.c
@@
-188,7
+188,12
@@
void __init reserve_crashkernel(void)
(unsigned long)(crashk_res.start >> 20),
(unsigned long)(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)) {
+ pr_err("Failed to reserve memory for crashkernel!\n");
+ crashk_res.start = crashk_res.end = 0;
+ return;
+ }
}
int overlaps_crashkernel(unsigned long start, unsigned long size)