lkml.org 
[lkml]   [2012]   [Jun]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] printk: Ensure oops printing if console is locked
Date
From: Aurelien Gerault <aurelien.gerault-nonst@stericsson.com>

Ensuring that oops & panic messages/backtraces will be printed
in console, even when the console is locked.

If console is locked by someone else but an oops is ongoing, force
unlocking / re-locking to display the oops.

Signed-off-by: Aurelien Gerault <aurelien.gerault-nonst@stericsson.com>
---
kernel/printk.c | 5 +++++
1 file changed, 5 insertions(+)

diff --git a/kernel/printk.c b/kernel/printk.c
index 6d24237..be2a625 100644
--- a/kernel/printk.c
+++ b/kernel/printk.c
@@ -1014,6 +1014,11 @@ asmlinkage int vprintk(const char *fmt, va_list args)
*/
if (console_trylock_for_printk(this_cpu))
console_unlock();
+ else if (oops_in_progress) {
+ /* force releasing / acquiring console lock to print oops */
+ console_unlock();
+ console_lock();
+ }

lockdep_on();
out_restore_irqs:
--
1.7.10


\
 
 \ /
  Last update: 2012-06-13 17:41    [W:0.140 / U:2.096 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site