Preempt realtime Oops syslog
PATCH 1/2 Preempt realtime Oops syslog
Add bust_spinlocks when kernel die from do_trap to flush Oops dump to syslog immediatly. Oops is missing from syslog if it is from non-preemptible section, because on PREEMPT_RT kernel, Oops printk doesn't wake up klogd from non-preemptible context; see release_console_sem in kernel/printk.c.
Tested by Oops in module_init and insmod that kernel module. The Oops is in non-preemptive context because modules are loaded from inside a realtime priority thread in a preemptive realtime kernel.
Only apply to PPC arch because bust_spinlocks has already been used by x86 and other architectures
Signed-off-by Min Zhang <[email protected]>
arch/ppc/kernel/traps.c +1 -0
@@ -92,6 +92,7 @@ int die(const char * str, struct pt_regsif (nl)printk ("\n" );show_regs (fp); +bust_spinlocks (0 );add_taint (TAINT_DIE );spin_unlock_irq (&die_lock);/* do_exit() should take care of panic'ing from an interrupt