|
@@ -274,10 +274,12 @@ static DEFINE_RAW_SPINLOCK(die_lock);
|
|
void die(const char *str, struct pt_regs *regs, int err)
|
|
void die(const char *str, struct pt_regs *regs, int err)
|
|
{
|
|
{
|
|
int ret;
|
|
int ret;
|
|
|
|
+ unsigned long flags;
|
|
|
|
+
|
|
|
|
+ raw_spin_lock_irqsave(&die_lock, flags);
|
|
|
|
|
|
oops_enter();
|
|
oops_enter();
|
|
|
|
|
|
- raw_spin_lock_irq(&die_lock);
|
|
|
|
console_verbose();
|
|
console_verbose();
|
|
bust_spinlocks(1);
|
|
bust_spinlocks(1);
|
|
ret = __die(str, err, regs);
|
|
ret = __die(str, err, regs);
|
|
@@ -287,13 +289,15 @@ void die(const char *str, struct pt_regs *regs, int err)
|
|
|
|
|
|
bust_spinlocks(0);
|
|
bust_spinlocks(0);
|
|
add_taint(TAINT_DIE, LOCKDEP_NOW_UNRELIABLE);
|
|
add_taint(TAINT_DIE, LOCKDEP_NOW_UNRELIABLE);
|
|
- raw_spin_unlock_irq(&die_lock);
|
|
|
|
oops_exit();
|
|
oops_exit();
|
|
|
|
|
|
if (in_interrupt())
|
|
if (in_interrupt())
|
|
panic("Fatal exception in interrupt");
|
|
panic("Fatal exception in interrupt");
|
|
if (panic_on_oops)
|
|
if (panic_on_oops)
|
|
panic("Fatal exception");
|
|
panic("Fatal exception");
|
|
|
|
+
|
|
|
|
+ raw_spin_unlock_irqrestore(&die_lock, flags);
|
|
|
|
+
|
|
if (ret != NOTIFY_STOP)
|
|
if (ret != NOTIFY_STOP)
|
|
do_exit(SIGSEGV);
|
|
do_exit(SIGSEGV);
|
|
}
|
|
}
|