lkml.org 
[lkml]   [2013]   [Mar]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH v3 2/6] TTY: wake up processes last at hangup
Date
Move wake up of processes on blocked-open and modem-status wait queues
to after port shutdown at hangup.

This way the woken up processes can use the ASYNC_INITIALIZED flag to
detect port shutdown.

Note that this is the order currently used by serial-core.

Signed-off-by: Johan Hovold <jhovold@gmail.com>
---
drivers/tty/tty_port.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/tty/tty_port.c b/drivers/tty/tty_port.c
index 57a061e..3de5918 100644
--- a/drivers/tty/tty_port.c
+++ b/drivers/tty/tty_port.c
@@ -231,9 +231,9 @@ void tty_port_hangup(struct tty_port *port)
}
port->tty = NULL;
spin_unlock_irqrestore(&port->lock, flags);
+ tty_port_shutdown(port);
wake_up_interruptible(&port->open_wait);
wake_up_interruptible(&port->delta_msr_wait);
- tty_port_shutdown(port);
}
EXPORT_SYMBOL(tty_port_hangup);

--
1.8.1.1


\
 
 \ /
  Last update: 2013-03-07 16:43    [W:0.273 / U:0.056 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site