Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2010-08-02 16:25:37 +0200
committerThomas Gleixner <tglx@linutronix.de>2010-08-02 16:29:38 +0200
commit8a990abe111ffa920f22d4ed04af1415c30d3c3a (patch)
treeb9d369959601ca62aa0a41229dd0739cb9d73135
parentd2decbffe1da7e3d295aa93315ad214a29a0fe36 (diff)
printk: Restore irqs before calling release_console_mutex()
Mike reported that printk is not working properly on RT. The reason is that we call release_console_mutex() which calls the console drivers with interrupts disabled, even if printk was called from an irq enabled region. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Tested-by: Mike Galbraith <efault@gmx.de>
-rw-r--r--kernel/printk.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/kernel/printk.c b/kernel/printk.c
index bbce874de364..0f3aafdf5ac8 100644
--- a/kernel/printk.c
+++ b/kernel/printk.c
@@ -797,9 +797,11 @@ asmlinkage int vprintk(const char *fmt, va_list args)
* will release 'logbuf_lock' regardless of whether it
* actually gets the mutex or not.
*/
- if (acquire_console_mutex_for_printk(this_cpu))
+ if (acquire_console_mutex_for_printk(this_cpu)) {
+ raw_local_irq_restore(flags);
release_console_mutex();
-
+ raw_local_irq_save(flags);
+ }
lockdep_on();
out:
raw_local_irq_restore(flags);
@@ -1069,7 +1071,7 @@ void release_console_mutex(void)
/*
* on PREEMPT_RT, call console drivers with
* interrupts enabled (if printk was called
- * with interrupts disabled):
+ * with interrupts enabled):
*/
#ifdef CONFIG_PREEMPT_RT
raw_spin_unlock_irqrestore(&logbuf_lock, flags);