| From d0aeb3b2d1dedff915a34d94347f6f2d494fba9d 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> |
| Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> |
| --- |
| kernel/printk.c | 4 ++-- |
| 1 files changed, 2 insertions(+), 2 deletions(-) |
| |
| diff --git a/kernel/printk.c b/kernel/printk.c |
| index 75077ad..53011ba 100644 |
| --- a/kernel/printk.c |
| +++ b/kernel/printk.c |
| @@ -82,7 +82,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); |
| |
| @@ -537,7 +537,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.0.4 |
| |