2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-21 11:44:01 +08:00
linux-next/drivers/usb/mon
Alan Stern fca94748c5 USB: usbmon: fix bug in mon_buff_area_shrink
This patch (as1299b) fixes a bug in an error-handling path of usbmon's
binary interface.  The storage area for URB data is divided into
fixed-size blocks.  If an URB's data can't be copied, the area
reserved for it should be decreased to the size of the truncated
information (rounded up to a block boundary).  Rounding up the amount
to be removed and subtracting it from the reserved size is definitely
the wrong thing to do.

Also, when the data for an isochronous URB can't be copied, we can
still copy the isoc packet descriptors.  In fact the current code does
copy the descriptors, but then sets the capture length to 0 so they
remain inaccessible.  The capture length should be reduced to the
length of the descriptors, not set to 0.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Acked-by: Pete Zaitcev <zaitcev@redhat.com>
CC: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-11-17 16:46:34 -08:00
..
Kconfig USB: usbmon: drop Kconfig defaults 2009-09-23 06:46:19 -07:00
Makefile USB: usbmon: end ugly tricks with DMA peeking 2009-09-23 06:46:19 -07:00
mon_bin.c USB: usbmon: fix bug in mon_buff_area_shrink 2009-11-17 16:46:34 -08:00
mon_main.c USB: usbmon: end ugly tricks with DMA peeking 2009-09-23 06:46:19 -07:00
mon_stat.c USB: usbmon: use simple_read_from_buffer() 2008-07-21 15:16:31 -07:00
mon_text.c USB: usbmon: end ugly tricks with DMA peeking 2009-09-23 06:46:19 -07:00
usb_mon.h USB: usbmon: end ugly tricks with DMA peeking 2009-09-23 06:46:19 -07:00