Commit a8f108d7 authored by Marcin Nowakowski's avatar Marcin Nowakowski Committed by Ralf Baechle
Browse files

MIPS: kexec: Do not reserve invalid crashkernel memory on boot

Do not reserve memory for the crashkernel if the commandline argument
points to a wrong location. This can happen if the location is specified
wrong or if the same commandline is reused when starting the crashkernel
- in the latter case the reserved memory would point to the location
from which the crashkernel is executing.

Signed-off-by: default avatarMarcin Nowakowski <>

Signed-off-by: default avatarRalf Baechle <>
parent 73fbc1eb
......@@ -741,6 +741,11 @@ static void __init mips_parse_crashkernel(void)
if (ret != 0 || crash_size <= 0)
if (!memory_region_available(crash_base, crash_size)) {
pr_warn("Invalid memory region reserved for crash kernel\n");
crashk_res.start = crash_base;
crashk_res.end = crash_base + crash_size - 1;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment