[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <1339578852-17617-1-git-send-email-aurelien.gerault-xsig@stericsson.com>
Date: Wed, 13 Jun 2012 11:14:12 +0200
From: Aurelien Gerault <aurelien.gerault-xsig@...ricsson.com>
To: <linux-kernel@...r.kernel.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: Aurelien Gerault <aurelien.gerault-nonst@...ricsson.com>
Subject: [PATCH] printk: Ensure oops printing if console is locked
From: Aurelien Gerault <aurelien.gerault-nonst@...ricsson.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@...ricsson.com>
ST-Ericsson Linux next: NA
ST-Ericsson ID: 436456
ST-Ericsson FOSS-OUT ID: Trivial
Change-Id: I9f571492fefc32291ecd0cc62f0ad7031cab7c6d
---
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
--
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