Skip to content

Commit 10b14cb

Browse files
heukelumIngo Molnar
authored andcommitted
x86, dumpstack: always call oops_exit from oops_end
Always call oops_exit from oops_end, even if signr==0. Also, move add_taint(TAINT_DIE) from __die to oops_end on x86_64 and interchange two lines to make oops_end more similar to the i386-version. Signed-off-by: Alexander van Heukelum <[email protected]> Acked-by: Neil Horman <[email protected]> Signed-off-by: Ingo Molnar <[email protected]>
1 parent 0ed7a49 commit 10b14cb

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

arch/x86/kernel/dumpstack_32.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -318,14 +318,14 @@ void __kprobes oops_end(unsigned long flags, struct pt_regs *regs, int signr)
318318
__raw_spin_unlock(&die_lock);
319319
raw_local_irq_restore(flags);
320320

321+
oops_exit();
321322
if (!signr)
322323
return;
323324

324325
if (in_interrupt())
325326
panic("Fatal exception in interrupt");
326327
if (panic_on_oops)
327328
panic("Fatal exception");
328-
oops_exit();
329329
do_exit(signr);
330330
}
331331

arch/x86/kernel/dumpstack_64.c

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -461,22 +461,22 @@ void __kprobes oops_end(unsigned long flags, struct pt_regs *regs, int signr)
461461
if (regs && kexec_should_crash(current))
462462
crash_kexec(regs);
463463

464-
die_owner = -1;
465464
bust_spinlocks(0);
465+
die_owner = -1;
466+
add_taint(TAINT_DIE);
466467
die_nest_count--;
467468
if (!die_nest_count)
468469
/* Nest count reaches zero, release the lock. */
469470
__raw_spin_unlock(&die_lock);
470471
raw_local_irq_restore(flags);
471-
if (!signr) {
472-
oops_exit();
472+
oops_exit();
473+
474+
if (!signr)
473475
return;
474-
}
475476
if (in_interrupt())
476477
panic("Fatal exception in interrupt");
477478
if (panic_on_oops)
478479
panic("Fatal exception");
479-
oops_exit();
480480
do_exit(signr);
481481
}
482482

@@ -499,7 +499,6 @@ int __kprobes __die(const char *str, struct pt_regs *regs, long err)
499499
return 1;
500500

501501
show_registers(regs);
502-
add_taint(TAINT_DIE);
503502
/* Executive summary in case the oops scrolled away */
504503
printk(KERN_ALERT "RIP ");
505504
printk_address(regs->ip, 1);

0 commit comments

Comments
 (0)