summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorBjørn Mork <bjorn@mork.no>2015-05-22 13:15:22 +0200
committerSasha Levin <sasha.levin@oracle.com>2015-06-15 14:26:50 -0400
commit842e6e8fe4c5e2fb62abe3a4ba5b213999d39eb3 (patch)
treed5a176b46b581e60b047757398d2f8e475444bc6 /net
parentfd92b07cb49f8d64efbf25bd344ab1855100b3ad (diff)
cdc_ncm: Fix tx_bytes statistics
[ Upstream commit 44f6731d8b68fa02f5ed65eaceac41f8c3c9279e ] The tx_curr_frame_payload field is u32. When we try to calculate a small negative delta based on it, we end up with a positive integer close to 2^32 instead. So the tx_bytes pointer increases by about 2^32 for every transmitted frame. Fix by calculating the delta as a signed long. Cc: Ben Hutchings <ben.hutchings@codethink.co.uk> Reported-by: Florian Bruhin <me@the-compiler.org> Fixes: 7a1e890e2168 ("usbnet: Fix tx_bytes statistic running backward in cdc_ncm") Signed-off-by: Bjørn Mork <bjorn@mork.no> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
Diffstat (limited to 'net')
0 files changed, 0 insertions, 0 deletions