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: <20100128174546.GC19871@kroah.com>
Date:	Thu, 28 Jan 2010 09:45:46 -0800
From:	Greg KH <greg@...ah.com>
To:	Oliver Neukum <oliver@...kum.org>
Cc:	Matthew Garrett <mjg59@...f.ucam.org>, dvomlehn@...co.com,
	gregkh@...e.de, linux-usb@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [REGRESSION] "USB: use kfifo to buffer usb-generic serial
 writes" causes gobi_loader to hang

On Tue, Jan 19, 2010 at 02:20:29PM +0100, Oliver Neukum wrote:
> Am Montag, 18. Januar 2010 21:14:16 schrieb Matthew Garrett:
> 
> > drivers/usb/serial/generic.c: usb_serial_generic_write - port 0, 1565 
> > bytes
> > drivers/usb/serial/generic.c: usb_serial_generic_write - put 0 bytes 
> > into fifo
> > drivers/usb/serial/generic.c: usb_serial_generic_read_bulk_callback - 
> > port 0
> 
> If the FIFO is full we can do nothing. Please try the attached patch.

Did we ever determine if the patch below is needed or not?

thanks,

greg k-h

> From d7317bae0772b794a1cc9b832bc3d3e1b3642a13 Mon Sep 17 00:00:00 2001
> From: Oliver Neukum <oliver@...kum.org>
> Date: Tue, 19 Jan 2010 14:16:41 +0100
> Subject: [PATCH] usb:serial:Deal with filled FIFO
> 
> Bail out if the FIFO is filled
> 
> Signed-off-by: Oliver Neukum <oliver@...kum.org>
> ---
>  drivers/usb/serial/generic.c |    4 ++++
>  1 files changed, 4 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/usb/serial/generic.c b/drivers/usb/serial/generic.c
> index 76e5514..053f7f1 100644
> --- a/drivers/usb/serial/generic.c
> +++ b/drivers/usb/serial/generic.c
> @@ -349,6 +349,10 @@ int usb_serial_generic_write(struct tty_struct *tty,
>  
>  	count = kfifo_in_locked(&port->write_fifo, buf, count, &port->lock);
>  	dbg("%s - put %d bytes into fifo", __func__, count);
> +	if (!count) {
> +		dbg("%s - FIFO is full", __func__);
> +		return 0;
> +	}
>  	result = usb_serial_generic_write_start(port);
>  
>  	if (result >= 0)
> -- 
> 1.6.4.2
> 

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