From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Miller Subject: Re: [Patch net v2] net/ipv6: do not copy dst flags on rt init Date: Mon, 17 Sep 2018 19:43:37 -0700 (PDT) Message-ID: <20180917.194337.206158871668725470.davem@davemloft.net> References: <20180917172053.126170-1-posk@google.com> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org, dsahern@gmail.com To: posk@google.com Return-path: Received: from shards.monkeyblade.net ([23.128.96.9]:54506 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726434AbeIRIN6 (ORCPT ); Tue, 18 Sep 2018 04:13:58 -0400 In-Reply-To: <20180917172053.126170-1-posk@google.com> Sender: netdev-owner@vger.kernel.org List-ID: From: Peter Oskolkov Date: Mon, 17 Sep 2018 10:20:53 -0700 > DST_NOCOUNT in dst_entry::flags tracks whether the entry counts > toward route cache size (net->ipv6.sysctl.ip6_rt_max_size). > > If the flag is NOT set, dst_ops::pcpuc_entries counter is incremented > in dist_init() and decremented in dst_destroy(). > > This flag is tied to allocation/deallocation of dst_entry and > should not be copied from another dst/route. Otherwise it can happen > that dst_ops::pcpuc_entries counter grows until no new routes can > be allocated because the counter reached ip6_rt_max_size due to > DST_NOCOUNT not set and thus no counter decrements on gc-ed routes. > > Fixes: 3b6761d18bc1 ("net/ipv6: Move dst flags to booleans in fib entries") > Cc: David Ahern > Acked-by: Wei Wang > Signed-off-by: Peter Oskolkov Applied and queued up for -stable, thank you.