From 1dbcebcc81df6b61ae719d651a9f43af23163c65 Mon Sep 17 00:00:00 2001 From: Jiri Slaby Date: Thu, 25 Aug 2011 15:12:04 +0200 Subject: [PATCH] --- yaml --- r: 267315 b: refs/heads/master c: 426929f8d3514d7f727b8c464d1eeeaf74b21519 h: refs/heads/master i: 267313: 1988c247b55ca8d45b7539ea17834f21c36fd7c4 267311: 7e049dcf708d61461443cd0f33f13e2dbcc45e9c v: v3 --- [refs] | 2 +- trunk/drivers/tty/serial/serial_core.c | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 27e06ed3881f..af28d94f1dfc 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: dfc97fcebd6a9a85335adcfc0e4d0a204bbaea35 +refs/heads/master: 426929f8d3514d7f727b8c464d1eeeaf74b21519 diff --git a/trunk/drivers/tty/serial/serial_core.c b/trunk/drivers/tty/serial/serial_core.c index 3844980b397f..849bd0d06b2c 100644 --- a/trunk/drivers/tty/serial/serial_core.c +++ b/trunk/drivers/tty/serial/serial_core.c @@ -1288,6 +1288,7 @@ static void uart_close(struct tty_struct *tty, struct file *filp) * the line discipline to only process XON/XOFF characters by * setting tty->closing. */ + set_bit(ASYNCB_CLOSING, &port->flags); tty->closing = 1; spin_unlock_irqrestore(&port->lock, flags); @@ -1335,8 +1336,10 @@ static void uart_close(struct tty_struct *tty, struct file *filp) * Wake up anyone trying to open this port. */ clear_bit(ASYNCB_NORMAL_ACTIVE, &port->flags); + clear_bit(ASYNCB_CLOSING, &port->flags); spin_unlock_irqrestore(&port->lock, flags); wake_up_interruptible(&port->open_wait); + wake_up_interruptible(&port->close_wait); done: mutex_unlock(&port->mutex);