public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] printk: Ensure oops printing if console is locked
@ 2012-06-13  9:14 Aurelien Gerault
  2012-06-13 14:11 ` Greg Kroah-Hartman
  0 siblings, 1 reply; 4+ messages in thread
From: Aurelien Gerault @ 2012-06-13  9:14 UTC (permalink / raw)
  To: linux-kernel, Greg Kroah-Hartman; +Cc: Aurelien Gerault

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>
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


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] printk: Ensure oops printing if console is locked
  2012-06-13  9:14 [PATCH] printk: Ensure oops printing if console is locked Aurelien Gerault
@ 2012-06-13 14:11 ` Greg Kroah-Hartman
  2012-06-13 14:49   ` Aurélien Gérault
  0 siblings, 1 reply; 4+ messages in thread
From: Greg Kroah-Hartman @ 2012-06-13 14:11 UTC (permalink / raw)
  To: Aurelien Gerault; +Cc: linux-kernel, Aurelien Gerault

On Wed, Jun 13, 2012 at 11:14:12AM +0200, Aurelien Gerault wrote:
> 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>
> ST-Ericsson Linux next: NA
> ST-Ericsson ID: 436456
> ST-Ericsson FOSS-OUT ID: Trivial

What are those fields for?

> Change-Id: I9f571492fefc32291ecd0cc62f0ad7031cab7c6d

What is this for?

Please clean up the patch before sending it out publicly, we can't take
stuff like this...


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] printk: Ensure oops printing if console is locked
  2012-06-13 14:11 ` Greg Kroah-Hartman
@ 2012-06-13 14:49   ` Aurélien Gérault
  0 siblings, 0 replies; 4+ messages in thread
From: Aurélien Gérault @ 2012-06-13 14:49 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: linux-kernel@vger.kernel.org

Oh yes, sorry about that, will upload a new patch soon.

On 06/13/2012 04:11 PM, Greg Kroah-Hartman wrote:
> What are those fields for?
>
>> Change-Id: I9f571492fefc32291ecd0cc62f0ad7031cab7c6d
> What is this for?
>
> Please clean up the patch before sending it out publicly, we can't take
> stuff like this...
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH] printk: Ensure oops printing if console is locked
@ 2012-06-13 14:51 Aurelien Gerault
  0 siblings, 0 replies; 4+ messages in thread
From: Aurelien Gerault @ 2012-06-13 14:51 UTC (permalink / raw)
  To: linux-kernel, Greg Kroah-Hartman; +Cc: Aurelien Gerault

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


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-06-13 15:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-13  9:14 [PATCH] printk: Ensure oops printing if console is locked Aurelien Gerault
2012-06-13 14:11 ` Greg Kroah-Hartman
2012-06-13 14:49   ` Aurélien Gérault
  -- strict thread matches above, loose matches on Subject: below --
2012-06-13 14:51 Aurelien Gerault

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox