* + fix-null-pointer-dereference-in-ia64_machine_kexec.patch added to -mm tree
@ 2007-02-06 23:45 akpm
0 siblings, 0 replies; only message in thread
From: akpm @ 2007-02-06 23:45 UTC (permalink / raw)
To: mm-commits; +Cc: bwalle, horms, jlan, magnus, stable, tony.luck
The patch titled
Fix NULL-pointer dereference in ia64_machine_kexec()
has been added to the -mm tree. Its filename is
fix-null-pointer-dereference-in-ia64_machine_kexec.patch
*** Remember to use Documentation/SubmitChecklist when testing your code ***
See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this
------------------------------------------------------
Subject: Fix NULL-pointer dereference in ia64_machine_kexec()
From: Bernhard Walle <bwalle@suse.de>
This patch fixes a NULL-pointer dereference in ia64_machine_kexec().
The variable ia64_kimage is set in machine_kexec_prepare() which is
called from sys_kexec_load(). If kdump wasn't configured before,
ia64_kimage is NULL. machine_kdump_on_init() passes ia64_kimage() to
machine_kexec() which assumes a valid value.
The patch also adds a few sanity checks for the image to simplify
debugging of similar problems in future.
Signed-off-by: Bernhard Walle <bwalle@suse.de>
Cc: "Luck, Tony" <tony.luck@intel.com>
Cc: Magnus Damm <magnus@valinux.co.jp>
Cc: Simon Horman <horms@verge.net.au>
Cc: Jay Lan <jlan@sgi.com>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
arch/ia64/kernel/crash.c | 5 +++++
arch/ia64/kernel/machine_kexec.c | 2 ++
2 files changed, 7 insertions(+)
diff -puN arch/ia64/kernel/crash.c~fix-null-pointer-dereference-in-ia64_machine_kexec arch/ia64/kernel/crash.c
--- a/arch/ia64/kernel/crash.c~fix-null-pointer-dereference-in-ia64_machine_kexec
+++ a/arch/ia64/kernel/crash.c
@@ -118,6 +118,11 @@ machine_crash_shutdown(struct pt_regs *p
static void
machine_kdump_on_init(void)
{
+ if (!ia64_kimage) {
+ printk(KERN_NOTICE "machine_kdump_on_init(): "
+ "kdump not configured\n");
+ return;
+ }
local_irq_disable();
kexec_disable_iosapic();
machine_kexec(ia64_kimage);
diff -puN arch/ia64/kernel/machine_kexec.c~fix-null-pointer-dereference-in-ia64_machine_kexec arch/ia64/kernel/machine_kexec.c
--- a/arch/ia64/kernel/machine_kexec.c~fix-null-pointer-dereference-in-ia64_machine_kexec
+++ a/arch/ia64/kernel/machine_kexec.c
@@ -95,6 +95,7 @@ static void ia64_machine_kexec(struct un
unsigned long vector;
int ii;
+ BUG_ON(!image);
if (image->type == KEXEC_TYPE_CRASH) {
crash_save_this_cpu();
current->thread.ksp = (__u64)info->sw - 16;
@@ -133,6 +134,7 @@ static void ia64_machine_kexec(struct un
void machine_kexec(struct kimage *image)
{
+ BUG_ON(!image);
unw_init_running(ia64_machine_kexec, image);
for(;;);
}
_
Patches currently in -mm which might be from bwalle@suse.de are
spider-fix-gregkh-driver-network-device.patch
fix-null-pointer-dereference-in-ia64_machine_kexec.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2007-02-06 23:47 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-06 23:45 + fix-null-pointer-dereference-in-ia64_machine_kexec.patch added to -mm tree akpm
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.