From: Weidong Wang <wangweidong1@huawei.com>
To: Florian Westphal <fw@strlen.de>
Cc: <pablo@netfilter.org>, <kaber@trash.net>,
<kadlec@blackhole.kfki.hu>, David Miller <davem@davemloft.net>,
<netfilter-devel@vger.kernel.org>, <coreteam@netfilter.org>,
<netdev@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH net-next] netfilter: nf_conntrack: remove the unneed check for *bucket
Date: Sun, 31 Jan 2016 11:37:07 +0800 [thread overview]
Message-ID: <56AD8163.4050309@huawei.com> (raw)
In-Reply-To: <20160130213003.GA13560@breakpoint.cc>
On 2016/1/31 5:30, Florian Westphal wrote:
> Weidong Wang <wangweidong1@huawei.com> 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
> .
>
next prev parent reply other threads:[~2016-01-31 3:37 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-30 12:25 [PATCH net-next] netfilter: nf_conntrack: remove the unneed check for *bucket Weidong Wang
2016-01-30 21:30 ` Florian Westphal
2016-01-31 3:37 ` Weidong Wang [this message]
2016-02-01 16:39 ` David Laight
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=56AD8163.4050309@huawei.com \
--to=wangweidong1@huawei.com \
--cc=coreteam@netfilter.org \
--cc=davem@davemloft.net \
--cc=fw@strlen.de \
--cc=kaber@trash.net \
--cc=kadlec@blackhole.kfki.hu \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=netfilter-devel@vger.kernel.org \
--cc=pablo@netfilter.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).