blob: ca1a954247771747806a1bb7b7d08f422f06316e [file] [log] [blame]
From 9868cc33e569ae8b78f7859e74f245f979a20a1f Mon Sep 17 00:00:00 2001
From: Thomas Gleixner <tglx@linutronix.de>
Date: Sun, 26 Jul 2009 00:35:13 +0200
Subject: [PATCH] printk: Make console_sem a semaphore not a pseudo mutex
commit c94aff2e932748c416c6b70d708b9f146bcf86c9 in tip.
It needs to be investigated whether it can be replaced by a real
mutex, but that needs more thought and investigation.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
diff --git a/kernel/printk.c b/kernel/printk.c
index 1751c45..8ae415b 100644
--- a/kernel/printk.c
+++ b/kernel/printk.c
@@ -83,7 +83,7 @@ EXPORT_SYMBOL(oops_in_progress);
* provides serialisation for access to the entire console
* driver system.
*/
-static DECLARE_MUTEX(console_sem);
+static DEFINE_SEMAPHORE(console_sem);
struct console *console_drivers;
EXPORT_SYMBOL_GPL(console_drivers);
@@ -544,7 +544,7 @@ static void zap_locks(void)
/* If a crash is occurring, make sure we can't deadlock */
spin_lock_init(&logbuf_lock);
/* And make sure that we print immediately */
- init_MUTEX(&console_sem);
+ semaphore_init(&console_sem);
}
#if defined(CONFIG_PRINTK_TIME)
--
1.7.1.1