diff options
author | Nicholas Piggin <npiggin@gmail.com> | 2016-11-08 23:14:45 +1100 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2016-11-18 22:40:42 +1100 |
commit | 7458e8b2ce62e65051fec0bcb14cac35d4f1118d (patch) | |
tree | 841e9e6f98052fc24b57abcdd2971608d00b4faf /arch | |
parent | 6f44b20ee9b4130345c189c0c90ef6604bcd8005 (diff) |
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: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/powerpc/kernel/traps.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c index 13ca8b687e88..3eb20d16c67c 100644 --- a/arch/powerpc/kernel/traps.c +++ b/arch/powerpc/kernel/traps.c @@ -147,14 +147,15 @@ static void oops_end(unsigned long flags, struct pt_regs *regs, int signr) { bust_spinlocks(0); - die_owner = -1; add_taint(TAINT_DIE, LOCKDEP_NOW_UNRELIABLE); die_nest_count--; oops_exit(); printk("\n"); - if (!die_nest_count) + if (!die_nest_count) { /* Nest count reaches zero, release the lock. */ + die_owner = -1; arch_spin_unlock(&die_lock); + } raw_local_irq_restore(flags); crash_fadump(regs, "die oops"); |