[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1203133483.10893.25.camel@dhcp140.mvista.com>
Date: Fri, 15 Feb 2008 19:44:43 -0800
From: Min Zhang <mzhang@...sta.com>
To: linux-kernel@...r.kernel.org
Subject: [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 <mzhang@...sta.com>
Index: rt-2.6/arch/ppc/kernel/traps.c
===================================================================
--- rt-2.6.orig/arch/ppc/kernel/traps.c
+++ rt-2.6/arch/ppc/kernel/traps.c
@@ -92,6 +92,7 @@ int die(const char * str, struct pt_regs
if (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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists