[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <758FD608-F046-4FC8-BB2A-5D91F01F3F78@mork.no>
Date: Fri, 22 May 2015 20:48:01 +0200
From: Bjørn Mork <bjorn@...k.no>
To: Ben Hutchings <ben.hutchings@...ethink.co.uk>
CC: netdev@...r.kernel.org, Florian Bruhin <me@...-compiler.org>,
linux-usb@...r.kernel.org, Oliver Neukum <oliver@...kum.org>
Subject: Re: [PATCH net,stable-4.0] cdc_ncm: Fix tx_bytes statistics
On 22 May 2015 19:22:47 CEST, Ben Hutchings <ben.hutchings@...ethink.co.uk> wrote:
>On Fri, 2015-05-22 at 13:15 +0200, Bjørn Mork wrote:
>> 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.
>
>Told you I hadn't tested it.
Yes, I know. This was all my bad. Sorry. Didn't mean to imply that you were to blame here. On the contrary. Thanks again for showing how to solve this.
Bjørn
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists