From: Arnd Bergmann on
This was not caught in the initial sweep through
the TTY layer, nor by lockdep, which does not know
about classic semaphores.

Signed-off-by: Arnd Bergmann <arnd(a)arndb.de>
---
kernel/printk.c | 11 ++++++++++-
1 files changed, 10 insertions(+), 1 deletions(-)

diff --git a/kernel/printk.c b/kernel/printk.c
index 75077ad..30669a3 100644
--- a/kernel/printk.c
+++ b/kernel/printk.c
@@ -970,7 +970,16 @@ void resume_console(void)
void acquire_console_sem(void)
{
BUG_ON(in_interrupt());
- down(&console_sem);
+ if (down_trylock(&console_sem)) {
+ /*
+ * we may get called here with the BTM held.
+ * it's not clear whether we get the BTM while
+ * holding console_sem, need to check.
+ */
+ release_tty_lock(current);
+ down(&console_sem);
+ reacquire_tty_lock(current);
+ }
if (console_suspended)
return;
console_locked = 1;
--
1.7.0.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/