lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4E7B7EAA.50706@gmail.com>
Date:	Thu, 22 Sep 2011 20:30:02 +0200
From:	Jiri Slaby <jirislaby@...il.com>
To:	Jiri Slaby <jslaby@...e.cz>
CC:	gregkh@...e.de, linux-serial@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/4] TTY: serial, fix locking imbalance

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@...e.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ