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>] [day] [month] [year] [list]
Message-ID: <20190219124115.GB4867@kroah.com>
Date:   Tue, 19 Feb 2019 13:41:15 +0100
From:   Greg KH <gregkh@...uxfoundation.org>
To:     yes@...ah.com
Cc:     robh@...nel.org, jslaby@...e.com, linux-serial@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] tty: not call tty close in fallback

On Mon, Jan 14, 2019 at 02:56:01PM +0800, yes wrote:
> From: Li RongQing <lirongqing@...du.com>
> 
> when fail to open tty, tty is not in open status and not need
> to call close
> 
> Signed-off-by: Li RongQing <lirongqing@...du.com>
> ---
>  drivers/tty/serdev/serdev-ttyport.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/tty/serdev/serdev-ttyport.c b/drivers/tty/serdev/serdev-ttyport.c
> index fa1672993b4c..bcc1e27d00de 100644
> --- a/drivers/tty/serdev/serdev-ttyport.c
> +++ b/drivers/tty/serdev/serdev-ttyport.c
> @@ -121,7 +121,7 @@ static int ttyport_open(struct serdev_controller *ctrl)
>  
>  	ret = tty->ops->open(serport->tty, NULL);
>  	if (ret)
> -		goto err_close;
> +		goto err_unlock;
>  
>  	tty_unlock(serport->tty);
>  
> @@ -142,8 +142,6 @@ static int ttyport_open(struct serdev_controller *ctrl)
>  
>  	return 0;
>  
> -err_close:
> -	tty->ops->close(tty, NULL);

No, close is always called after open, even if open fails.

thanks,

greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ