From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Ahern Subject: Re: [PATCH net-next] net/ipv6: stop leaking percpu memory in fib6 info Date: Mon, 8 Oct 2018 12:15:54 -0600 Message-ID: <8b36e7c9-0f9b-64c4-f7d6-1d1a92097eaa@gmail.com> References: <1539000363-25333-1-git-send-email-rppt@linux.vnet.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org, stable@vger.kernel.org To: Mike Rapoport , "David S. Miller" Return-path: Received: from mail-pf1-f193.google.com ([209.85.210.193]:34393 "EHLO mail-pf1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726348AbeJIB2y (ORCPT ); Mon, 8 Oct 2018 21:28:54 -0400 In-Reply-To: <1539000363-25333-1-git-send-email-rppt@linux.vnet.ibm.com> Content-Language: en-US Sender: netdev-owner@vger.kernel.org List-ID: 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 > 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