diff options
author | Bjørn Mork <bjorn@mork.no> | 2015-05-22 14:15:22 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-05-22 21:26:31 +0300 |
commit | 44f6731d8b68fa02f5ed65eaceac41f8c3c9279e (patch) | |
tree | 56c9360d6cae85fc174784af990aebb010ee45e6 /arch/arm/common | |
parent | 572152adfba711f770fc7ec5d140070a91d8e045 (diff) | |
download | linux-44f6731d8b68fa02f5ed65eaceac41f8c3c9279e.tar.xz |
cdc_ncm: Fix tx_bytes statistics
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>
Diffstat (limited to 'arch/arm/common')
0 files changed, 0 insertions, 0 deletions