]> git.baikalelectronics.ru Git - kernel.git/commit
USB: usbfs: only copy the actual data received
authorGreg KH <greg@kroah.com>
Mon, 15 Feb 2010 17:37:46 +0000 (09:37 -0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 16 Feb 2010 23:11:01 +0000 (15:11 -0800)
commit167697dac831d6b3e4e0ca81589d4b8821a6cc90
tree087b4ad7f541d166147f85941020bfbccfa3b0ba
parent6fba9e49cc1a2deadd56565791199bcd58cda8ff
USB: usbfs: only copy the actual data received

We need to only copy the data received by the device to userspace, not
the whole kernel buffer, which can contain "stale" data.

Thanks to Marcus Meissner for pointing this out and testing the fix.

Reported-by: Marcus Meissner <meissner@suse.de>
Tested-by: Marcus Meissner <meissner@suse.de>
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/core/devio.c