From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pl0-f66.google.com ([209.85.160.66]:44008 "EHLO mail-pl0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752186AbeCXPbE (ORCPT ); Sat, 24 Mar 2018 11:31:04 -0400 Received: by mail-pl0-f66.google.com with SMTP id f23-v6so9235021plr.10 for ; Sat, 24 Mar 2018 08:31:04 -0700 (PDT) Subject: Re: [PATCH RFC v2 net-next 19/21] net/ipv6: separate handling of FIB entries from dst based routes To: Ido Schimmel Cc: netdev@vger.kernel.org, davem@davemloft.net, roopa@cumulusnetworks.com, eric.dumazet@gmail.com, weiwan@google.com, kafai@fb.com, yoshfuji@linux-ipv6.org References: <20180319033622.16693-1-dsahern@gmail.com> <20180319033622.16693-20-dsahern@gmail.com> <20180324143100.GA19895@splinter> From: David Ahern Message-ID: Date: Sat, 24 Mar 2018 09:31:02 -0600 MIME-Version: 1.0 In-Reply-To: <20180324143100.GA19895@splinter> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: netdev-owner@vger.kernel.org List-ID: On 3/24/18 8:31 AM, Ido Schimmel wrote: > On Sun, Mar 18, 2018 at 08:36:20PM -0700, David Ahern wrote: >> @@ -405,18 +383,9 @@ static void ip6_dst_destroy(struct dst_entry *dst) >> rt->rt6i_idev = NULL; >> in6_dev_put(idev); >> } >> - bucket = rcu_dereference_protected(rt->rt6i_exception_bucket, 1); >> - if (bucket) { >> - rt->rt6i_exception_bucket = NULL; >> - kfree(bucket); >> - } >> - >> - m = rt->fib6_metrics; >> - if (m != &dst_default_metrics && refcount_dec_and_test(&m->refcnt)) >> - kfree(m); > > You remove this... > >> >> rt->from = NULL; >> - dst_release(&from->dst); >> + fib6_info_release(from); > > Yet fib6_info_release() doesn't take care of it (unlike the IPv4 > equivalent), which means you're leaking the metrics. > >> } ok, I'll take a look. I thought I verified both paths (fib6_info and dst) were freeing the metrics.