__raw_spin_unlock(&die_lock);
raw_local_irq_restore(flags);
- if (!regs)
+ if (!signr)
return;
if (in_interrupt())
void die(const char *str, struct pt_regs *regs, long err)
{
unsigned long flags = oops_begin();
+ int sig = SIGSEGV;
if (die_nest_count < 3) {
report_bug(regs->ip, regs);
if (__die(str, regs, err))
- regs = NULL;
+ sig = 0;
} else {
printk(KERN_EMERG "Recursive die() failure, output suppressed\n");
}
- oops_end(flags, regs, SIGSEGV);
+ oops_end(flags, regs, sig);
}
static DEFINE_SPINLOCK(nmi_print_lock);
/* Nest count reaches zero, release the lock. */
__raw_spin_unlock(&die_lock);
raw_local_irq_restore(flags);
- if (!regs) {
+ if (!signr) {
oops_exit();
return;
}
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
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);
unsigned long error_code)
{
unsigned long flags = oops_begin();
+ int sig = SIGKILL;
struct task_struct *tsk;
printk(KERN_ALERT "%s: Corrupted page table at address %lx\n",
tsk->thread.trap_no = 14;
tsk->thread.error_code = error_code;
if (__die("Bad pagetable", regs, error_code))
- regs = NULL;
- oops_end(flags, regs, SIGKILL);
+ sig = 0;
+ oops_end(flags, regs, sig);
}
#endif
int fault;
#ifdef CONFIG_X86_64
unsigned long flags;
+ int sig;
#endif
tsk = current;
bust_spinlocks(0);
do_exit(SIGKILL);
#else
+ sig = SIGKILL;
if (__die("Oops", regs, error_code))
- regs = NULL;
+ sig = 0;
/* Executive summary in case the body of the oops scrolled away */
printk(KERN_EMERG "CR2: %016lx\n", address);
- oops_end(flags, regs, SIGKILL);
+ oops_end(flags, regs, sig);
#endif
/*