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]
Date:   Fri, 5 Mar 2021 11:18:06 +0100
From:   Johan Hovold <johan@...nel.org>
To:     Jiri Slaby <jslaby@...e.cz>
Cc:     gregkh@...uxfoundation.org, linux-serial@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH 44/44] tty: make everyone's write_room return >= 0

On Tue, Mar 02, 2021 at 07:22:14AM +0100, Jiri Slaby wrote:
> The tty line disciplines don't expect tty_operations::write_room to
> return negative values. Fix the five drivers which violate this.
> 
> Signed-off-by: Jiri Slaby <jslaby@...e.cz>
> ---
>  drivers/staging/gdm724x/gdm_tty.c | 2 +-
>  drivers/tty/ipwireless/tty.c      | 4 ++--
>  drivers/tty/n_gsm.c               | 2 +-
>  drivers/tty/vcc.c                 | 2 +-
>  drivers/usb/serial/mos7720.c      | 2 +-
>  5 files changed, 6 insertions(+), 6 deletions(-)

> diff --git a/drivers/usb/serial/mos7720.c b/drivers/usb/serial/mos7720.c
> index 701dfb32b129..bb3d39307d93 100644
> --- a/drivers/usb/serial/mos7720.c
> +++ b/drivers/usb/serial/mos7720.c
> @@ -1042,7 +1042,7 @@ static int mos7720_write_room(struct tty_struct *tty)
>  
>  	mos7720_port = usb_get_serial_port_data(port);
>  	if (mos7720_port == NULL)
> -		return -ENODEV;
> +		return 0;

This test is bogus and could just be removed, but that's for another
patch.

>  
>  	/* FIXME: Locking */
>  	for (i = 0; i < NUM_URBS; ++i) {

Johan

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ