From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757245AbcAaDhb (ORCPT ); Sat, 30 Jan 2016 22:37:31 -0500 Received: from szxga02-in.huawei.com ([119.145.14.65]:26180 "EHLO szxga02-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754593AbcAaDh3 (ORCPT ); Sat, 30 Jan 2016 22:37:29 -0500 Message-ID: <56AD8163.4050309@huawei.com> Date: Sun, 31 Jan 2016 11:37:07 +0800 From: Weidong Wang User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:12.0) Gecko/20120428 Thunderbird/12.0.1 MIME-Version: 1.0 To: Florian Westphal CC: , , , David Miller , , , , Subject: Re: [PATCH net-next] netfilter: nf_conntrack: remove the unneed check for *bucket References: <56ACABBC.9050303@huawei.com> <20160130213003.GA13560@breakpoint.cc> In-Reply-To: <20160130213003.GA13560@breakpoint.cc> Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.177.21.100] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A020204.56AD816D.000A,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0, ip=0.0.0.0, so=2013-06-18 04:22:30, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: 64fe44e45a8b818ba5f972f9c8c32475 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2016/1/31 5:30, Florian Westphal wrote: > Weidong Wang wrote: >> In the 'for(...) {}', the *bucket alwasy < net->ct.htable_size, >> so remove the check >> @@ -1383,14 +1383,12 @@ get_next_corpse(struct net *net, int (*iter)(struct nf_conn *i, void *data), >> lockp = &nf_conntrack_locks[*bucket % CONNTRACK_LOCKS]; >> local_bh_disable(); >> spin_lock(lockp); >> - if (*bucket < net->ct.htable_size) { > > AFAIU net->ct.htable_size can shrink between for-test and aquiring > the bucket lockp, so this additional if-test is needed. > ok, Got it. So ignore this patch. Regards, Weidong > . >