Netdev List
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: xiyou.wangcong@gmail.com
Cc: netdev@vger.kernel.org, ignacy.gawedzki@green-communications.fr,
	David.Laight@aculab.com
Subject: Re: [Patch] gen_stats.c: Duplicate xstats buffer for later use
Date: Thu, 19 Feb 2015 15:47:03 -0500 (EST)	[thread overview]
Message-ID: <20150219.154703.443300865954985533.davem@davemloft.net> (raw)
In-Reply-To: <1423867625-1509-1-git-send-email-xiyou.wangcong@gmail.com>

From: Cong Wang <xiyou.wangcong@gmail.com>
Date: Fri, 13 Feb 2015 14:47:05 -0800

> From: Ignacy Gawędzki <ignacy.gawedzki@green-communications.fr>
> 
> The gnet_stats_copy_app() function gets called, more often than not, with its
> second argument a pointer to an automatic variable in the caller's stack.
> Therefore, to avoid copying garbage afterwards when calling
> gnet_stats_finish_copy(), this data is better copied to a dynamically allocated
> memory that gets freed after use.
> 
> [xiyou.wangcong@gmail.com: remove a useless kfree()]
> 
> Signed-off-by: Ignacy Gawędzki <ignacy.gawedzki@green-communications.fr>
> Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>

Ugh, that's an ugly bug.

Applied and queued up for -stable, thanks.

      reply	other threads:[~2015-02-19 20:47 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-13 22:47 [Patch] gen_stats.c: Duplicate xstats buffer for later use Cong Wang
2015-02-19 20:47 ` David Miller [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=20150219.154703.443300865954985533.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=David.Laight@aculab.com \
    --cc=ignacy.gawedzki@green-communications.fr \
    --cc=netdev@vger.kernel.org \
    --cc=xiyou.wangcong@gmail.com \
    /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