From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jeff Barnhill <0xeffeff@gmail.com> Subject: Re: [PATCH net v4] net/ipv6: Add anycast addresses to a global hashtable Date: Sat, 27 Oct 2018 21:27:04 -0400 Message-ID: References: <95cb5670-eaf0-c7af-7e35-bc4f6e68c5ba@gmail.com> <20181027180232.23154-1-0xeffeff@gmail.com> <8b4e657f-f64a-060b-e535-d9a487db64ed@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Cc: netdev@vger.kernel.org, davem@davemloft.net, Alexey Kuznetsov , yoshfuji@linux-ipv6.org To: David Ahern Return-path: Received: from mail-yb1-f194.google.com ([209.85.219.194]:39433 "EHLO mail-yb1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728872AbeJ1KK1 (ORCPT ); Sun, 28 Oct 2018 06:10:27 -0400 Received: by mail-yb1-f194.google.com with SMTP id j9-v6so2034827ybj.6 for ; Sat, 27 Oct 2018 18:27:31 -0700 (PDT) In-Reply-To: <8b4e657f-f64a-060b-e535-d9a487db64ed@gmail.com> Sender: netdev-owner@vger.kernel.org List-ID: You are right, David...I mistook the refcount_dec_and_test() in aca_put() as being for the fib6_info, but it's for the aca_refcnt. Thanks! I'll submit a corrected patch. On Sat, Oct 27, 2018 at 7:39 PM David Ahern wrote: > > On 10/27/18 12:02 PM, Jeff Barnhill wrote: > > @@ -275,6 +356,11 @@ int __ipv6_dev_ac_inc(struct inet6_dev *idev, const struct in6_addr *addr) > > err = -ENOMEM; > > goto out; > > } > > + err = ipv6_add_acaddr_hash(dev_net(idev->dev), addr); > > + if (err) { > > + aca_put(aca); > > + goto out; > > + } > > > > aca->aca_next = idev->ac_list; > > idev->ac_list = aca; > > you misunderstood my comment. aca_put is instead of a double call to > fib6_info_release(f6i). You still need one call to > fib6_info_release(f6i) for the addrconf_f6i_alloc.