diff options
Diffstat (limited to 'arch/i386')
-rw-r--r-- | arch/i386/kernel/traps.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/arch/i386/kernel/traps.c b/arch/i386/kernel/traps.c index ab0e9430f775..bb36a989db77 100644 --- a/arch/i386/kernel/traps.c +++ b/arch/i386/kernel/traps.c | |||
@@ -306,14 +306,17 @@ void die(const char * str, struct pt_regs * regs, long err) | |||
306 | .lock_owner_depth = 0 | 306 | .lock_owner_depth = 0 |
307 | }; | 307 | }; |
308 | static int die_counter; | 308 | static int die_counter; |
309 | unsigned long flags; | ||
309 | 310 | ||
310 | if (die.lock_owner != raw_smp_processor_id()) { | 311 | if (die.lock_owner != raw_smp_processor_id()) { |
311 | console_verbose(); | 312 | console_verbose(); |
312 | spin_lock_irq(&die.lock); | 313 | spin_lock_irqsave(&die.lock, flags); |
313 | die.lock_owner = smp_processor_id(); | 314 | die.lock_owner = smp_processor_id(); |
314 | die.lock_owner_depth = 0; | 315 | die.lock_owner_depth = 0; |
315 | bust_spinlocks(1); | 316 | bust_spinlocks(1); |
316 | } | 317 | } |
318 | else | ||
319 | local_save_flags(flags); | ||
317 | 320 | ||
318 | if (++die.lock_owner_depth < 3) { | 321 | if (++die.lock_owner_depth < 3) { |
319 | int nl = 0; | 322 | int nl = 0; |
@@ -340,7 +343,7 @@ void die(const char * str, struct pt_regs * regs, long err) | |||
340 | 343 | ||
341 | bust_spinlocks(0); | 344 | bust_spinlocks(0); |
342 | die.lock_owner = -1; | 345 | die.lock_owner = -1; |
343 | spin_unlock_irq(&die.lock); | 346 | spin_unlock_irqrestore(&die.lock, flags); |
344 | 347 | ||
345 | if (kexec_should_crash(current)) | 348 | if (kexec_should_crash(current)) |
346 | crash_kexec(regs); | 349 | crash_kexec(regs); |