aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/x86_64/kernel/traps.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/x86_64/kernel/traps.c b/arch/x86_64/kernel/traps.c
index cb29fb96948d..aac1c0be54c6 100644
--- a/arch/x86_64/kernel/traps.c
+++ b/arch/x86_64/kernel/traps.c
@@ -465,13 +465,14 @@ static unsigned int die_nest_count;
465 465
466unsigned __kprobes long oops_begin(void) 466unsigned __kprobes long oops_begin(void)
467{ 467{
468 int cpu = smp_processor_id(); 468 int cpu;
469 unsigned long flags; 469 unsigned long flags;
470 470
471 oops_enter(); 471 oops_enter();
472 472
473 /* racy, but better than risking deadlock. */ 473 /* racy, but better than risking deadlock. */
474 local_irq_save(flags); 474 local_irq_save(flags);
475 cpu = smp_processor_id();
475 if (!spin_trylock(&die_lock)) { 476 if (!spin_trylock(&die_lock)) {
476 if (cpu == die_owner) 477 if (cpu == die_owner)
477 /* nested oops. should stop eventually */; 478 /* nested oops. should stop eventually */;