netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: kafai@fb.com
Cc: netdev@vger.kernel.org, kernel-team@fb.com,
	hannes@stressinduktion.org, pety@rusnet.ru
Subject: Re: [PATCH net] ipv6: Fix mem leak in rt6i_pcpu
Date: Tue, 05 Jul 2016 14:09:49 -0700 (PDT)	[thread overview]
Message-ID: <20160705.140949.1356441872073525132.davem@davemloft.net> (raw)
In-Reply-To: <1467745823-1402823-1-git-send-email-kafai@fb.com>

From: Martin KaFai Lau <kafai@fb.com>
Date: Tue, 5 Jul 2016 12:10:23 -0700

> It was first reported and reproduced by Petr (thanks!) in
> https://bugzilla.kernel.org/show_bug.cgi?id=119581
> 
> free_percpu(rt->rt6i_pcpu) used to always happen in ip6_dst_destroy().
> 
> However, after fixing a deadlock bug in
> commit 9c7370a166b4 ("ipv6: Fix a potential deadlock when creating pcpu rt"),
> free_percpu() is not called before setting non_pcpu_rt->rt6i_pcpu to NULL.
> 
> It is worth to note that rt6i_pcpu is protected by table->tb6_lock.
> 
> kmemleak somehow did not report it.  We nailed it down by
> observing the pcpu entries in /proc/vmallocinfo (first suggested
> by Hannes, thanks!).
> 
> Signed-off-by: Martin KaFai Lau <kafai@fb.com>
> Fixes: 9c7370a166b4 ("ipv6: Fix a potential deadlock when creating pcpu rt")
> Reported-by: Petr Novopashenniy <pety@rusnet.ru>
> Tested-by: Petr Novopashenniy <pety@rusnet.ru>
> Acked-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
> Cc: Hannes Frederic Sowa <hannes@stressinduktion.org>
> Cc: Petr Novopashenniy <pety@rusnet.ru>

Applied and queued up for -stable.

      reply	other threads:[~2016-07-05 21:09 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-05 19:10 [PATCH net] ipv6: Fix mem leak in rt6i_pcpu Martin KaFai Lau
2016-07-05 21:09 ` 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=20160705.140949.1356441872073525132.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=hannes@stressinduktion.org \
    --cc=kafai@fb.com \
    --cc=kernel-team@fb.com \
    --cc=netdev@vger.kernel.org \
    --cc=pety@rusnet.ru \
    /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).