The patch titled kexec: fix crashdump panic with CONFIG_KEXEC_JUMP has been added to the -mm tree. Its filename is kexec-fix-crashdump-panic-with-config_kexec_jump.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** See http://userweb.kernel.org/~akpm/stuff/added-to-mm.txt to find out what to do about this The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/ ------------------------------------------------------ Subject: kexec: fix crashdump panic with CONFIG_KEXEC_JUMP From: Huang Ying <ying.huang@xxxxxxxxx> Content-Transfer-Encoding: quoted-printable Tim Starling reported that crashdump will panic with kernel compiled with CONFIG_KEXEC_JUMP due to null pointer deference in machine_kexec_32.c: machine_kexec(), when deferencing kexec_image. Addresses http://bugzilla.kernel.org/show_bug.cgi?id=3D13265 This patch fixes the BUG by replacing global variable reference: kexec_image in machine_kexec() with local variable reference: image, which is more appropriate, and will not be null. The same BUG is in machine_kexec_64.c too, and is fixed in the same way. Reported-by: Tim Starling <tstarling@xxxxxxxxxxxxx> Signed-off-by: Huang Ying <ying.huang@xxxxxxxxx> Cc: <stable@xxxxxxxxxx> Cc: "Eric W. Biederman" <ebiederm@xxxxxxxxxxxx> Cc: Vivek Goyal <vgoyal@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- arch/x86/kernel/machine_kexec_32.c | 4 ++-- arch/x86/kernel/machine_kexec_64.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff -puN arch/x86/kernel/machine_kexec_32.c~kexec-fix-crashdump-panic-with-config_kexec_jump arch/x86/kernel/machine_kexec_32.c --- a/arch/x86/kernel/machine_kexec_32.c~kexec-fix-crashdump-panic-with-config_kexec_jump +++ a/arch/x86/kernel/machine_kexec_32.c @@ -194,7 +194,7 @@ void machine_kexec(struct kimage *image) unsigned int preserve_context); #ifdef CONFIG_KEXEC_JUMP - if (kexec_image->preserve_context) + if (image->preserve_context) save_processor_state(); #endif @@ -253,7 +253,7 @@ void machine_kexec(struct kimage *image) image->preserve_context); #ifdef CONFIG_KEXEC_JUMP - if (kexec_image->preserve_context) + if (image->preserve_context) restore_processor_state(); #endif diff -puN arch/x86/kernel/machine_kexec_64.c~kexec-fix-crashdump-panic-with-config_kexec_jump arch/x86/kernel/machine_kexec_64.c --- a/arch/x86/kernel/machine_kexec_64.c~kexec-fix-crashdump-panic-with-config_kexec_jump +++ a/arch/x86/kernel/machine_kexec_64.c @@ -274,7 +274,7 @@ void machine_kexec(struct kimage *image) int save_ftrace_enabled; #ifdef CONFIG_KEXEC_JUMP - if (kexec_image->preserve_context) + if (image->preserve_context) save_processor_state(); #endif @@ -333,7 +333,7 @@ void machine_kexec(struct kimage *image) image->preserve_context); #ifdef CONFIG_KEXEC_JUMP - if (kexec_image->preserve_context) + if (image->preserve_context) restore_processor_state(); #endif _ Patches currently in -mm which might be from ying.huang@xxxxxxxxx are kexec-fix-crashdump-panic-with-config_kexec_jump.patch linux-next.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html