netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Ahern <dsahern@gmail.com>
To: Mike Rapoport <rppt@linux.vnet.ibm.com>,
	"David S. Miller" <davem@davemloft.net>
Cc: netdev@vger.kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH net-next] net/ipv6: stop leaking percpu memory in fib6 info
Date: Mon, 8 Oct 2018 12:15:54 -0600	[thread overview]
Message-ID: <8b36e7c9-0f9b-64c4-f7d6-1d1a92097eaa@gmail.com> (raw)
In-Reply-To: <1539000363-25333-1-git-send-email-rppt@linux.vnet.ibm.com>

On 10/8/18 6:06 AM, Mike Rapoport wrote:
> The fib6_info_alloc() function allocates percpu memory to hold per CPU
> pointers to rt6_info, but this memory is never freed. Fix it.
> 
> Fixes: a64efe142f5e ("net/ipv6: introduce fib6_info struct and helpers")
> 
> Signed-off-by: Mike Rapoport <rppt@linux.vnet.ibm.com>
> Cc: stable@vger.kernel.org
> ---
>  net/ipv6/ip6_fib.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/net/ipv6/ip6_fib.c b/net/ipv6/ip6_fib.c
> index cf709eadc932..cc7de7eb8b9c 100644
> --- a/net/ipv6/ip6_fib.c
> +++ b/net/ipv6/ip6_fib.c
> @@ -194,6 +194,8 @@ void fib6_info_destroy_rcu(struct rcu_head *head)
>  				*ppcpu_rt = NULL;
>  			}
>  		}
> +
> +		free_percpu(f6i->rt6i_pcpu);
>  	}
>  
>  	lwtstate_put(f6i->fib6_nh.nh_lwtstate);
> 

Odd that KMEMLEAK is not detecting this. Thanks for the fix.

Reviewed-by: David Ahern <dsahern@gmail.com>

  parent reply	other threads:[~2018-10-09  1:28 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-08 12:06 [PATCH net-next] net/ipv6: stop leaking percpu memory in fib6 info Mike Rapoport
2018-10-08 17:46 ` David Miller
2018-10-08 18:15 ` David Ahern [this message]
2018-10-09  4:03   ` Mike Rapoport

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=8b36e7c9-0f9b-64c4-f7d6-1d1a92097eaa@gmail.com \
    --to=dsahern@gmail.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=rppt@linux.vnet.ibm.com \
    --cc=stable@vger.kernel.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).