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] [day] [month] [year] [list]
Date:	Mon, 09 Dec 2013 12:13:50 +0800
From:	"Li, ZhenHua" <zhen-hual@...com>
To:	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Jiri Slaby <jslaby@...e.cz>, linux-kernel@...r.kernel.org
CC:	"Li, Zhen-Hua" <zhen-hual@...com>
Subject: Re: [PATCH 1/1] drivers/tty: Fix missed unlocks for tty_release

Hi,

I found it was incorrect. So please IGNORE this patch.
Sorry for that.


On 12/09/2013 11:20 AM, Li, Zhen-Hua wrote:
> In function tty_release, there are two unlock not called while
> breaking from a while. This may cause problems.
> This patch fixed this problem , adding the two unlocks before
> break is called.
>
> Signed-off-by: Li, Zhen-Hua <zhen-hual@...com>
> ---
>   drivers/tty/tty_io.c | 6 ++++--
>   1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c
> index c74a00a..d41b0da 100644
> --- a/drivers/tty/tty_io.c
> +++ b/drivers/tty/tty_io.c
> @@ -1777,9 +1777,11 @@ int tty_release(struct inode *inode, struct file *filp)
>   				do_sleep++;
>   			}
>   		}
> -		if (!do_sleep)
> +		if (!do_sleep) {
> +			tty_unlock_pair(tty, o_tty);
> +			mutex_unlock(&tty_mutex);
>   			break;
> -
> +		}
>   		printk(KERN_WARNING "%s: %s: read/write wait queue active!\n",
>   				__func__, tty_name(tty, buf));
>   		tty_unlock_pair(tty, o_tty);
>

--
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