All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/4] TTY: serial, fix locking imbalance
@ 2011-08-31 19:24 Jiri Slaby
  2011-08-31 19:24   ` Jiri Slaby
                   ` (4 more replies)
  0 siblings, 5 replies; 36+ messages in thread
From: Jiri Slaby @ 2011-08-31 19:24 UTC (permalink / raw)
  To: gregkh; +Cc: linux-serial, linux-kernel, jirislaby

Commit "TTY: serial, move locking in uart_close" moved the lock, but
omitted to update branches which unlock the lock. Now they try to
unlock the lock without holding it.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
If possible, please, merge this into the patch mentioned above (it's
not upstream yet).

 drivers/tty/serial/serial_core.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/tty/serial/serial_core.c b/drivers/tty/serial/serial_core.c
index 5c04cb9..c0fdbc5 100644
--- 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;
 	}
 
 	if ((tty->count == 1) && (port->count != 1)) {
@@ -1284,7 +1284,7 @@ static void uart_close(struct tty_struct *tty, struct file *filp)
 	}
 	if (port->count) {
 		spin_unlock_irqrestore(&port->lock, flags);
-		goto done;
+		return;
 	}
 
 	/*
@@ -1347,7 +1347,6 @@ static void uart_close(struct tty_struct *tty, struct file *filp)
 	wake_up_interruptible(&port->open_wait);
 	wake_up_interruptible(&port->close_wait);
 
-done:
 	mutex_unlock(&port->mutex);
 }
 
-- 
1.7.6.1



^ permalink raw reply related	[flat|nested] 36+ messages in thread

end of thread, other threads:[~2011-09-27  8:26 UTC | newest]

Thread overview: 36+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-31 19:24 [PATCH 1/4] TTY: serial, fix locking imbalance Jiri Slaby
2011-08-31 19:24 ` [PATCH 2/4] TTY: serial, remove dead code from 68328 Jiri Slaby
2011-08-31 19:24   ` Jiri Slaby
2011-08-31 19:51   ` Geert Uytterhoeven
2011-08-31 19:51     ` Geert Uytterhoeven
2011-08-31 19:51     ` Geert Uytterhoeven
2011-08-31 19:51       ` Geert Uytterhoeven
2011-08-31 19:51     ` Geert Uytterhoeven
2011-08-31 19:51   ` Geert Uytterhoeven
2011-08-31 19:24 ` [PATCH 3/4] TTY: serial, fix build of some drivers Jiri Slaby
2011-08-31 19:24   ` Jiri Slaby
2011-08-31 21:28   ` Alan Cox
2011-09-01  8:29     ` Jiri Slaby
2011-09-01  8:29       ` Jiri Slaby
2011-09-01 14:20   ` [PATCH v2 3/4] TTY: serial, fix includes in " Jiri Slaby
2011-09-01 14:20     ` Jiri Slaby
2011-08-31 19:24 ` [PATCH 4/4] TTY: serial, move 68360 driver to staging Jiri Slaby
2011-08-31 19:24   ` Jiri Slaby
2011-08-31 19:31   ` Sasha Levin
2011-08-31 19:31   ` Sasha Levin
2011-08-31 19:31     ` Sasha Levin
2011-08-31 19:37     ` [PATCH "find-renames version" " Jiri Slaby
2011-08-31 19:41     ` [PATCH " Greg KH
2011-08-31 19:41       ` Greg KH
2011-08-31 19:52   ` Geert Uytterhoeven
2011-08-31 19:52     ` Geert Uytterhoeven
2011-09-22 18:30 ` [PATCH 1/4] TTY: serial, fix locking imbalance Jiri Slaby
2011-09-22 18:38   ` Greg KH
2011-09-22 22:46 ` Greg KH
2011-09-23 18:52   ` Jiri Slaby
2011-09-23 19:08     ` Greg KH
2011-09-23 19:21       ` Jiri Slaby
2011-09-23 22:04         ` Greg KH
2011-09-24 17:50           ` Jiri Slaby
2011-09-26 23:36             ` Greg KH
2011-09-27  8:26               ` Jiri Slaby

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.