]> git.kernelconcepts.de Git - karo-tx-linux.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>
Thu, 1 Apr 2010 22:52:22 +0000 (15:52 -0700)
commit00400c98e8359ec5ecec199d66fbf25b944b8834
tree158138ab2066b4f5330c8562fb2942e6b767da70
parent540a2c33ffcf76ac804668839b89d79b9cc3b831
USB: usbfs: only copy the actual data received

commit d4a4683ca054ed9917dfc9e3ff0f7ecf74ad90d6 upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/core/devio.c