Thread (3 messages) 3 messages, 2 authors, 2011-09-22

Re: [PATCH: tty-next] TTY: serial: Move mutex_unlock in uart_close function

From: Greg KH <hidden>
Date: 2011-09-22 23:00:58

On Mon, Aug 29, 2011 at 03:43:36PM +0900, Nobuhiro Iwamatsu wrote:
When mutex_lock is not called, mutex_unlock is sometimes called.
This deletes unnecessary goto and makes modifications so that
mutex_unlock is called.
No you don't, your patch prevents mutex_unlock() from being called:
quoted hunk ↗ jump to hunk
--- a/drivers/tty/serial/serial_core.c
+++ b/drivers/tty/serial/serial_core.c
@@ -1262,7 +1262,7 @@ static void uart_close(struct tty_struct *tty, struct file *filp)
 
 	if (tty_hung_up_p(filp)) {
 		spin_unlock_irqrestore(&port->lock, flags);
-		goto done;
+		return;
Before this mutex_lock() was called, so we need to unlock it, yet you
just prevented that from happening.

So this patch is not correct at all, right?

greg k-h
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help