]> git.baikalelectronics.ru Git - kernel.git/commit
USB: xhci: Check URB's actual transfer buffer size.
authorSarah Sharp <sarah.a.sharp@linux.intel.com>
Thu, 27 Aug 2009 21:36:24 +0000 (14:36 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 23 Sep 2009 13:46:18 +0000 (06:46 -0700)
commitaff7d96ced19cd677e34fd30d978179999e536fc
treee42df1118729ba46166876ea5685d6216b540c2f
parente8557dc9c766cb74c04b68c332161aac5248c2dc
USB: xhci: Check URB's actual transfer buffer size.

Make sure that the amount of data the xHC says was transmitted is less
than or equal to the size of the requested transfer buffer.  Before, if
the host controller erroneously reported that the number of bytes
untransferred was bigger than the buffer in the URB, urb->actual_length
could be set to a very large size.

Make sure urb->actual_length <= urb->transfer_buffer_length.

Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/host/xhci-ring.c