提交 7458e8b2 编写于 作者: N Nicholas Piggin 提交者: Michael Ellerman

powerpc: Fix second nested oops hang

When ending an oops, don't clear die_owner unless the nest count
went to zero. This prevents a second nested oops from hanging forever
on the die_lock.
Signed-off-by: NNicholas Piggin <npiggin@gmail.com>
Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
上级 6f44b20e
...@@ -147,14 +147,15 @@ static void oops_end(unsigned long flags, struct pt_regs *regs, ...@@ -147,14 +147,15 @@ static void oops_end(unsigned long flags, struct pt_regs *regs,
int signr) int signr)
{ {
bust_spinlocks(0); bust_spinlocks(0);
die_owner = -1;
add_taint(TAINT_DIE, LOCKDEP_NOW_UNRELIABLE); add_taint(TAINT_DIE, LOCKDEP_NOW_UNRELIABLE);
die_nest_count--; die_nest_count--;
oops_exit(); oops_exit();
printk("\n"); printk("\n");
if (!die_nest_count) if (!die_nest_count) {
/* Nest count reaches zero, release the lock. */ /* Nest count reaches zero, release the lock. */
die_owner = -1;
arch_spin_unlock(&die_lock); arch_spin_unlock(&die_lock);
}
raw_local_irq_restore(flags); raw_local_irq_restore(flags);
crash_fadump(regs, "die oops"); crash_fadump(regs, "die oops");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册