summaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/dumpstack_64.c
diff options
context:
space:
mode:
authorAlexander van Heukelum <heukelum@fastmail.fm>2008-10-22 12:00:09 +0200
committerIngo Molnar <mingo@elte.hu>2008-10-22 14:00:23 +0200
commit874d93d11823b2b861addac6a5dc31162e924ab2 (patch)
tree6d84df0b35ca810ea5871be766934b0b20ad70b7 /arch/x86/kernel/dumpstack_64.c
parentb4b8f87bf4958cbad620654efc0882ac46c19846 (diff)
x86, dumpstack: let signr=0 signal no do_exit
Change oops_end such that signr=0 signals that do_exit is not to be called. Currently, each use of __die is soon followed by a call to oops_end and 'regs' is set to NULL if oops_end is expected not to call do_exit. Change all such pairs to set signr=0 instead. On x86_64 oops_end is used 'bare' in die_nmi; use signr=0 instead of regs=NULL there, too. Signed-off-by: Alexander van Heukelum <heukelum@fastmail.fm> Acked-by: Neil Horman <nhorman@tuxdriver.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel/dumpstack_64.c')
-rw-r--r--arch/x86/kernel/dumpstack_64.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/arch/x86/kernel/dumpstack_64.c b/arch/x86/kernel/dumpstack_64.c
index 96a5db7da8a..ffefea611ba 100644
--- a/arch/x86/kernel/dumpstack_64.c
+++ b/arch/x86/kernel/dumpstack_64.c
@@ -465,7 +465,7 @@ void __kprobes oops_end(unsigned long flags, struct pt_regs *regs, int signr)
/* Nest count reaches zero, release the lock. */
__raw_spin_unlock(&die_lock);
raw_local_irq_restore(flags);
- if (!regs) {
+ if (!signr) {
oops_exit();
return;
}
@@ -509,13 +509,14 @@ int __kprobes __die(const char *str, struct pt_regs *regs, long err)
void die(const char *str, struct pt_regs *regs, long err)
{
unsigned long flags = oops_begin();
+ int sig = SIGSEGV;
if (!user_mode(regs))
report_bug(regs->ip, regs);
if (__die(str, regs, err))
- regs = NULL;
- oops_end(flags, regs, SIGSEGV);
+ sig = 0;
+ oops_end(flags, regs, sig);
}
notrace __kprobes void
@@ -539,7 +540,7 @@ die_nmi(char *str, struct pt_regs *regs, int do_panic)
crash_kexec(regs);
if (do_panic || panic_on_oops)
panic("Non maskable interrupt");
- oops_end(flags, NULL, SIGBUS);
+ oops_end(flags, regs, 0);
nmi_exit();
local_irq_enable();
do_exit(SIGBUS);