mm-commits.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* + x86-fix-kernel-panic-on-i386-machine-when-booting-with-profile=2.patch added to -mm tree
@ 2009-10-06 21:09 akpm
  0 siblings, 0 replies; only message in thread
From: akpm @ 2009-10-06 21:09 UTC (permalink / raw)
  To: mm-commits; +Cc: alex.shi, hpa, mingo, rjw, tglx, tim.c.chen


The patch titled
     x86: fix kernel panic on i386 machine when booting with profile=2
has been added to the -mm tree.  Its filename is
     x86-fix-kernel-panic-on-i386-machine-when-booting-with-profile=2.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: x86: fix kernel panic on i386 machine when booting with profile=2
From: "Shi, Alex" <alex.shi@intel.com>

Latest kernel has a kernel panic in booting on i386 machine when profile=2
setting in cmdline.  It is due to 'sp' being incorrect in profile_pc().

BUG: unable to handle kernel NULL pointer dereference at 00000246
IP: [<c01288b6>] profile_pc+0x2a/0x48
*pde = 00000000
Oops: 0000 [#1] SMP

Signed-off-by: Alex Shi <alex.shi@intel.com>
Cc: "Chen, Tim C" <tim.c.chen@intel.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 arch/x86/kernel/time.c |    5 +++++
 1 file changed, 5 insertions(+)

diff -puN arch/x86/kernel/time.c~x86-fix-kernel-panic-on-i386-machine-when-booting-with-profile=2 arch/x86/kernel/time.c
--- a/arch/x86/kernel/time.c~x86-fix-kernel-panic-on-i386-machine-when-booting-with-profile=2
+++ a/arch/x86/kernel/time.c
@@ -38,7 +38,12 @@ unsigned long profile_pc(struct pt_regs 
 #ifdef CONFIG_FRAME_POINTER
 		return *(unsigned long *)(regs->bp + sizeof(long));
 #else
+#ifdef CONFIG_X86_32
+		unsigned long *sp = (unsigned long *)&regs->sp;
+#else
 		unsigned long *sp = (unsigned long *)regs->sp;
+
+#endif
 		/*
 		 * Return address is either directly at stack pointer
 		 * or above a saved flags. Eflags has bits 22-31 zero,
_

Patches currently in -mm which might be from alex.shi@intel.com are

x86-fix-kernel-panic-on-i386-machine-when-booting-with-profile=2.patch


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-10-06 21:10 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-10-06 21:09 + x86-fix-kernel-panic-on-i386-machine-when-booting-with-profile=2.patch added to -mm tree akpm

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).