From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out5-smtp.messagingengine.com ([66.111.4.29]:59871 "EHLO out5-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751901AbeCXObE (ORCPT ); Sat, 24 Mar 2018 10:31:04 -0400 Date: Sat, 24 Mar 2018 17:31:00 +0300 From: Ido Schimmel To: David Ahern 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 Subject: Re: [PATCH RFC v2 net-next 19/21] net/ipv6: separate handling of FIB entries from dst based routes Message-ID: <20180324143100.GA19895@splinter> References: <20180319033622.16693-1-dsahern@gmail.com> <20180319033622.16693-20-dsahern@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180319033622.16693-20-dsahern@gmail.com> Sender: netdev-owner@vger.kernel.org List-ID: 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. > }