[<prev] [next>] [day] [month] [year] [list]
Message-ID: <F7C8A4D3A9905B45A80E4C194793FA651553A456D1@PDSMSX501.ccr.corp.intel.com>
Date: Tue, 13 Oct 2009 13:35:41 +0800
From: "Shi, Alex" <alex.shi@...el.com>
To: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"mingo@...hat.com" <mingo@...hat.com>,
"hpa@...or.com" <hpa@...or.com>,
"Chen, Tim C" <tim.c.chen@...el.com>,
"Shi, Alex" <alex.shi@...el.com>,
"akpm@...ux-foundation.org" <akpm@...ux-foundation.org>,
"tglx@...utronix.de" <tglx@...utronix.de>,
"rjw@...k.pl" <rjw@...k.pl>,
"linux-tip-commits@...r.kernel.org"
<linux-tip-commits@...r.kernel.org>
Subject: RE: [tip:x86/urgent] x86: fix kernel panic on 32 bits when profiling
Yes, it seems better than mine.
BRG
Alex
-----Original Message-----
From: tip tree robot [mailto:bounces.tip@....at.zytor.com] On Behalf Of tip-bot for H. Peter Anvin
Sent: 2009年10月13日 2:58
To: linux-tip-commits@...r.kernel.org
Cc: Chen, Tim C; hpa@...or.com; mingo@...hat.com; akpm@...ux-foundation.org; Shi, Alex; tglx@...utronix.de; rjw@...k.pl
Subject: [tip:x86/urgent] x86: fix kernel panic on 32 bits when profiling
Commit-ID: d1705c558c95418378b11a0be963fe1b3e2fa381
Gitweb: http://git.kernel.org/tip/d1705c558c95418378b11a0be963fe1b3e2fa381
Author: H. Peter Anvin <hpa@...or.com>
AuthorDate: Mon, 12 Oct 2009 11:32:31 -0700
Committer: H. Peter Anvin <hpa@...or.com>
CommitDate: Mon, 12 Oct 2009 11:53:51 -0700
x86: fix kernel panic on 32 bits when profiling
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
This differs from the original version by Alex Shi in that we use the
kernel_stack_pointer() inline already defined in <asm/ptrace.h> for
this purpose, instead of #ifdef.
Originally-by: Alex Shi <alex.shi@...el.com>
Cc: "Chen, Tim C" <tim.c.chen@...el.com>
Cc: "Rafael J. Wysocki" <rjw@...k.pl>
Cc: Andrew Morton <akpm@...ux-foundation.org>
Signed-off-by: H. Peter Anvin <hpa@...or.com>
---
arch/x86/kernel/time.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/arch/x86/kernel/time.c b/arch/x86/kernel/time.c
index dcb00d2..be25734 100644
--- a/arch/x86/kernel/time.c
+++ b/arch/x86/kernel/time.c
@@ -38,7 +38,8 @@ unsigned long profile_pc(struct pt_regs *regs)
#ifdef CONFIG_FRAME_POINTER
return *(unsigned long *)(regs->bp + sizeof(long));
#else
- unsigned long *sp = (unsigned long *)regs->sp;
+ unsigned long *sp =
+ (unsigned long *)kernel_stack_pointer(regs);
/*
* Return address is either directly at stack pointer
* or above a saved flags. Eflags has bits 22-31 zero,
Powered by blists - more mailing lists