]> git.baikalelectronics.ru Git - kernel.git/commit
USB: handle zero-length usbfs submissions correctly
authorAlan Stern <stern@rowland.harvard.edu>
Mon, 29 Jun 2009 15:04:54 +0000 (11:04 -0400)
committerGreg Kroah-Hartman <gregkh@suse.de>
Sun, 12 Jul 2009 22:16:41 +0000 (15:16 -0700)
commitcb4f9319d254d88f482cbcac768bbda7bd73fc97
tree570d7079252a6a7b821e42383913ec0bfa09e4eb
parent0446a080b2d929bd6268e7ac3a4bf3a25d2c88cf
USB: handle zero-length usbfs submissions correctly

This patch (as1262) fixes a bug in usbfs: It refuses to accept
zero-length transfers, and it insists that the buffer pointer be valid
even if there is no data being transferred.

The patch also consolidates a bunch of repetitive access_ok() checks
into a single check, which incidentally fixes the lack of such a check
for Isochronous URBs.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/core/devio.c