netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Florian Bruhin <me-J2duszcpOy900TDglC2tyg@public.gmane.org>
To: David Miller <davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
Cc: bjorn-yOkvZcmFvRU@public.gmane.org,
	netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	oliver-GvhC2dPhHPQdnm+yROfE0A@public.gmane.org,
	ben.hutchings-4yDnlxn2s6sWdaTGBSpHTA@public.gmane.org
Subject: Re: [PATCH net,stable-4.0] cdc_ncm: Fix tx_bytes statistics
Date: Sat, 23 May 2015 11:27:08 +0200	[thread overview]
Message-ID: <20150523092708.GA23152@tonks> (raw)
In-Reply-To: <20150522.143421.442426385899149301.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>

[-- Attachment #1: Type: text/plain, Size: 1147 bytes --]

* David Miller <davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org> [2015-05-22 14:34:21 -0400]:
> From: Bjørn Mork <bjorn-yOkvZcmFvRU@public.gmane.org>
> 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 <ben.hutchings-4yDnlxn2s6sWdaTGBSpHTA@public.gmane.org>
> > Reported-by: Florian Bruhin <me-J2duszcpOy900TDglC2tyg@public.gmane.org>
> > Fixes: 7a1e890e2168 ("usbnet: Fix tx_bytes statistic running backward in cdc_ncm")
> > Signed-off-by: Bjørn Mork <bjorn-yOkvZcmFvRU@public.gmane.org>
> 
> Applied and queued up for -stable.

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

Florian

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

[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]

      parent reply	other threads:[~2015-05-23  9:27 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-22 11:15 [PATCH net,stable-4.0] cdc_ncm: Fix tx_bytes statistics Bjørn Mork
2015-05-22 17:22 ` Ben Hutchings
2015-05-22 18:48   ` Bjørn Mork
     [not found] ` <1432293322-11928-1-git-send-email-bjorn-yOkvZcmFvRU@public.gmane.org>
2015-05-22 18:34   ` David Miller
     [not found]     ` <20150522.143421.442426385899149301.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
2015-05-23  9:27       ` Florian Bruhin [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150523092708.GA23152@tonks \
    --to=me-j2duszcpoy900tdglc2tyg@public.gmane.org \
    --cc=ben.hutchings-4yDnlxn2s6sWdaTGBSpHTA@public.gmane.org \
    --cc=bjorn-yOkvZcmFvRU@public.gmane.org \
    --cc=davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org \
    --cc=linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=oliver-GvhC2dPhHPQdnm+yROfE0A@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).