From: Pete Zaitcev Date: Fri, 14 Nov 2008 16:47:41 +0000 (-0700) Subject: USB: usbmon: fix read(2) X-Git-Tag: v2.6.28-rc6~2^2~1 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f1c0a2a3aff53698f4855968d576464041d49b39;p=pandora-kernel.git USB: usbmon: fix read(2) There's a bug in the usbmon binary reader: When using read() to fetch the packets and a packet's data is partially read, the next read call will once again return up to len_cap bytes of data. The b_read counter is not regarded when determining the remaining chunk size. So, when dumping USB data with "cat /dev/usbmon0 > usbmon.trace" while reading from a USB storage device and analyzing the dump file afterwards it will get out of sync after a couple of packets. Signed-off-by: Ingo van Lil Signed-off-by: Pete Zaitcev Cc: stable Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed