aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/tty/tty_port.c
diff options
context:
space:
mode:
authorAlan Cox <alan@linux.intel.com>2012-07-14 10:31:27 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-07-16 15:58:12 -0400
commit6d31a88cb2e01d46c0cb74aa5da529e1f92ae3db (patch)
tree09ce3b070a845395f942b0ddeb8149514c0a7446 /drivers/tty/tty_port.c
parent467a3ca5cab64a16b5ec46ebb1895c84c280dcfe (diff)
tty: revert incorrectly applied lock patch
I sent GregKH this after the pre-requisites. He dropped the pre-requesites for good reason and unfortunately then applied this patch. Without this reverted you get random kernel memory corruption which will make bisecting anything between it and the properly applied patches a complete sod. Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/tty_port.c')
-rw-r--r--drivers/tty/tty_port.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/tty/tty_port.c b/drivers/tty/tty_port.c
index a3ba776c574c..4e9d2b291f4a 100644
--- a/drivers/tty/tty_port.c
+++ b/drivers/tty/tty_port.c
@@ -239,7 +239,7 @@ int tty_port_block_til_ready(struct tty_port *port,
239 239
240 /* block if port is in the process of being closed */ 240 /* block if port is in the process of being closed */
241 if (tty_hung_up_p(filp) || port->flags & ASYNC_CLOSING) { 241 if (tty_hung_up_p(filp) || port->flags & ASYNC_CLOSING) {
242 wait_event_interruptible_tty(tty, port->close_wait, 242 wait_event_interruptible_tty(port->close_wait,
243 !(port->flags & ASYNC_CLOSING)); 243 !(port->flags & ASYNC_CLOSING));
244 if (port->flags & ASYNC_HUP_NOTIFY) 244 if (port->flags & ASYNC_HUP_NOTIFY)
245 return -EAGAIN; 245 return -EAGAIN;
@@ -305,9 +305,9 @@ int tty_port_block_til_ready(struct tty_port *port,
305 retval = -ERESTARTSYS; 305 retval = -ERESTARTSYS;
306 break; 306 break;
307 } 307 }
308 tty_unlock(tty); 308 tty_unlock();
309 schedule(); 309 schedule();
310 tty_lock(tty); 310 tty_lock();
311 } 311 }
312 finish_wait(&port->open_wait, &wait); 312 finish_wait(&port->open_wait, &wait);
313 313