Prev: [29/89] USB: add missing delay during remote wakeup
Next: [49/89] USB: usbfs: only copy the actual data received
From: Greg KH on 30 Mar 2010 20:30 2.6.31-stable review patch. If anyone has any objections, please let us know. ------------------ From: Johan Hovold <jhovold(a)gmail.com> commit 2591530204a76fecc843529ade56afe865dd2657 upstream. Fix a regression introduced by commit 715b1dc01fe44537e8fce9566e4bb48d6821d84b ("USB: usb_debug, usb_generic_serial: implement multi urb write"). URB transfer buffer was never freed when using multi-urb writes. Currently the only driver enabling multi-urb writes is usb_debug. Signed-off-by: Johan Hovold <jhovold(a)gmail.com> Cc: Greg KH <greg(a)kroah.com> Acked-by: Jason Wessel <jason.wessel(a)windriver.com> Signed-off-by: Andrew Morton <akpm(a)linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh(a)suse.de> --- drivers/usb/serial/generic.c | 2 ++ 1 file changed, 2 insertions(+) --- a/drivers/usb/serial/generic.c +++ b/drivers/usb/serial/generic.c @@ -480,6 +480,8 @@ void usb_serial_generic_write_bulk_callb dbg("%s - port %d", __func__, port->number); if (port->serial->type->max_in_flight_urbs) { + kfree(urb->transfer_buffer); + spin_lock_irqsave(&port->lock, flags); --port->urbs_in_flight; port->tx_bytes_flight -= urb->transfer_buffer_length; -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ |