Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1322516
| From | Florian Westphal <fw@strlen.de> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH net-next] netfilter: nf_conntrack: remove the unneed check for *bucket |
| Date | 2016-01-30 22:40 +0100 |
| Message-ID | <qWLpo-1sy-11@gated-at.bofh.it> (permalink) |
| References | <qWCP8-2Cc-7@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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.
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH net-next] netfilter: nf_conntrack: remove the unneed check for *bucket Weidong Wang <wangweidong1@huawei.com> - 2016-01-30 13:30 +0100
Re: [PATCH net-next] netfilter: nf_conntrack: remove the unneed check for *bucket Florian Westphal <fw@strlen.de> - 2016-01-30 22:40 +0100
Re: [PATCH net-next] netfilter: nf_conntrack: remove the unneed check for *bucket Weidong Wang <wangweidong1@huawei.com> - 2016-01-31 04:40 +0100
RE: [PATCH net-next] netfilter: nf_conntrack: remove the unneed check for *bucket David Laight <David.Laight@ACULAB.COM> - 2016-02-01 17:50 +0100
csiph-web