From: Aurelien Gerault <aurelien.gerault-xsig@stericsson.com>
To: <linux-kernel@vger.kernel.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Aurelien Gerault <aurelien.gerault-nonst@stericsson.com>
Subject: [PATCH] printk: Ensure oops printing if console is locked
Date: Wed, 13 Jun 2012 16:51:08 +0200 [thread overview]
Message-ID: <1339599068-25215-1-git-send-email-aurelien.gerault-xsig@stericsson.com> (raw)
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
next reply other threads:[~2012-06-13 14:51 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-13 14:51 Aurelien Gerault [this message]
-- strict thread matches above, loose matches on Subject: below --
2012-06-13 9:14 Aurelien Gerault
2012-06-13 14:11 ` Greg Kroah-Hartman
2012-06-13 14:49 ` Aurélien Gérault
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1339599068-25215-1-git-send-email-aurelien.gerault-xsig@stericsson.com \
--to=aurelien.gerault-xsig@stericsson.com \
--cc=aurelien.gerault-nonst@stericsson.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®