Subject: Re: [PATCH net,stable-4.0] cdc_ncm: Fix tx_bytes statistics

From: Florian Bruhin <[email-masked]>
Date: Sat, 23 May 2015 11:27:08 +0200

* David Miller <davem-fT/PcQaiUtIeIZ0/[email-masked]> [2015-05-22 14:34:21 -0400]:
> From: Bjørn Mork <[email-masked]>
> Date: Fri, 22 May 2015 13:15:22 +0200
> 
> > 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 <[email-masked]>
> > Reported-by: Florian Bruhin <[email-masked]>
> > Fixes: 7a1e890e2168 ("usbnet: Fix tx_bytes statistic running backward in cdc_ncm")
> > Signed-off-by: Bjørn Mork <[email-masked]>
> 
> Applied and queued up for -stable.

Thank you, and thanks Bjørn for the quick fix!

Florian

-- 
http://www.the-compiler.org | [email-masked] (Mail/XMPP)
   GPG: 916E B0C8 FD55 A072 | http://the-compiler.org/pubkey.asc
         I love long mails! | http://email.is-not-s.ms/