From: Jiri Slaby <jirislaby@gmail.com>
To: Jiri Slaby <jslaby@suse.cz>
Cc: gregkh@suse.de, linux-serial@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/4] TTY: serial, fix locking imbalance
Date: Thu, 22 Sep 2011 20:30:02 +0200 [thread overview]
Message-ID: <4E7B7EAA.50706@gmail.com> (raw)
In-Reply-To: <1314818699-10873-1-git-send-email-jslaby@suse.cz>
On 08/31/2011 09:24 PM, Jiri Slaby wrote:
> 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).
Hi Greg, should I resend these?
> 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);
> }
>
--
js
next prev parent reply other threads:[~2011-09-22 18:30 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
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: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 21:28 ` Alan Cox
2011-09-01 8:29 ` Jiri Slaby
2011-09-01 14:20 ` [PATCH v2 3/4] TTY: serial, fix includes in " Jiri Slaby
2011-08-31 19:24 ` [PATCH 4/4] TTY: serial, move 68360 driver to staging Jiri Slaby
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:52 ` Geert Uytterhoeven
2011-09-22 18:30 ` Jiri Slaby [this message]
2011-09-22 18:38 ` [PATCH 1/4] TTY: serial, fix locking imbalance 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4E7B7EAA.50706@gmail.com \
--to=jirislaby@gmail.com \
--cc=gregkh@suse.de \
--cc=jslaby@suse.cz \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox