From mboxrd@z Thu Jan 1 00:00:00 1970 From: Florian Westphal Subject: Re: [Patch net v2] ipt_CLUSTERIP: fix a refcount bug in clusterip_config_find_get() Date: Thu, 8 Feb 2018 22:53:12 +0100 Message-ID: <20180208215312.GK14261@breakpoint.cc> References: <20180208215352.8294-1-xiyou.wangcong@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: netdev@vger.kernel.org, netfilter-devel@vger.kernel.org, pabeni@redhat.com, Eric Dumazet , Pablo Neira Ayuso , Florian Westphal To: Cong Wang Return-path: Content-Disposition: inline In-Reply-To: <20180208215352.8294-1-xiyou.wangcong@gmail.com> Sender: netfilter-devel-owner@vger.kernel.org List-Id: netdev.vger.kernel.org Cong Wang wrote: > In clusterip_config_find_get() we hold RCU read lock so it could > run concurrently with clusterip_config_entry_put(), as a result, > the refcnt could go back to 1 from 0, which leads to a double > list_del()... Just replace refcount_inc() with > refcount_inc_not_zero(), as for c->refcount. Reviewed-by: Florian Westphal