This is a note to let you know that I've just added the patch titled MIPS: kexec: Do not reserve invalid crashkernel memory on boot to the 4.9-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: mips-kexec-do-not-reserve-invalid-crashkernel-memory-on-boot.patch and it can be found in the queue-4.9 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From foo@baz Thu Oct 5 10:28:31 CEST 2017 From: Marcin Nowakowski <marcin.nowakowski@xxxxxxxxxx> Date: Wed, 23 Nov 2016 14:43:50 +0100 Subject: MIPS: kexec: Do not reserve invalid crashkernel memory on boot From: Marcin Nowakowski <marcin.nowakowski@xxxxxxxxxx> [ Upstream commit a8f108d70c74d83574c157648383eb2e4285a190 ] 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: Marcin Nowakowski <marcin.nowakowski@xxxxxxxxxx> Cc: linux-mips@xxxxxxxxxxxxxx Patchwork: https://patchwork.linux-mips.org/patch/14612/ Signed-off-by: Ralf Baechle <ralf@xxxxxxxxxxxxxx> Signed-off-by: Sasha Levin <alexander.levin@xxxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- arch/mips/kernel/setup.c | 5 +++++ 1 file changed, 5 insertions(+) --- a/arch/mips/kernel/setup.c +++ b/arch/mips/kernel/setup.c @@ -668,6 +668,11 @@ static void __init mips_parse_crashkerne if (ret != 0 || crash_size <= 0) return; + if (!memory_region_available(crash_base, crash_size)) { + pr_warn("Invalid memory region reserved for crash kernel\n"); + return; + } + crashk_res.start = crash_base; crashk_res.end = crash_base + crash_size - 1; } Patches currently in stable-queue which might be from marcin.nowakowski@xxxxxxxxxx are queue-4.9/mips-irq-stack-unwind-irq-stack-onto-task-stack.patch queue-4.9/mips-fix-mem-x-y-commandline-processing.patch queue-4.9/mips-kexec-do-not-reserve-invalid-crashkernel-memory-on-boot.patch