From e142a31da34b42458e10026b554e66127739cf23 Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date: Tue, 1 Jun 2010 22:53:10 +0200 Subject: tty: release BTM while sleeping in block_til_ready Most tty drivers may block while opening a device. Since this possibly depends on another thread closing it first and both threads may need the BTM, we need to release it here. Signed-off-by: Arnd Bergmann Cc: Alan Cox Signed-off-by: Greg Kroah-Hartman --- drivers/char/synclinkmp.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'drivers/char/synclinkmp.c') diff --git a/drivers/char/synclinkmp.c b/drivers/char/synclinkmp.c index ac447c7eb57..e56caf7d82a 100644 --- a/drivers/char/synclinkmp.c +++ b/drivers/char/synclinkmp.c @@ -3365,7 +3365,9 @@ static int block_til_ready(struct tty_struct *tty, struct file *filp, printk("%s(%d):%s block_til_ready() count=%d\n", __FILE__,__LINE__, tty->driver->name, port->count ); + tty_unlock(); schedule(); + tty_lock(); } set_current_state(TASK_RUNNING); -- cgit v1.2.3