USB: Do not pass negative length to snoop_urb()
authorMichal Sojka <sojkam1@fel.cvut.cz>
Tue, 15 Mar 2011 15:41:47 +0000 (16:41 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 23 Mar 2011 20:14:16 +0000 (13:14 -0700)
commit9d02b42614149ebccf12c9c580601ed01bd83070
tree010f30f5acba34e61aeff61e47aeaad8306ce1ff
parent4bbba111d94781d34081c37856bbc5eb33f6c72a
USB: Do not pass negative length to snoop_urb()

When `echo Y > /sys/module/usbcore/parameters/usbfs_snoop` and
usb_control_msg() returns error, a lot of kernel memory is dumped to dmesg
until unhandled kernel paging request occurs.

Signed-off-by: Michal Sojka <sojkam1@fel.cvut.cz>
Cc: stable@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/core/devio.c