Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 172148
b: refs/heads/master
c: 5ae27aa
h: refs/heads/master
v: v3
  • Loading branch information
Changli Gao authored and Patrick McHardy committed Nov 5, 2009
1 parent 61a7171 commit d1bc261
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9481721be10a1bfd1ee9ccf507eecd7f37caa5ec
refs/heads/master: 5ae27aa2b16478a84d833ab4065798e752941c5a
14 changes: 10 additions & 4 deletions trunk/net/netfilter/nf_conntrack_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -511,11 +511,17 @@ static noinline int early_drop(struct net *net, unsigned int hash)
cnt++;
}

if (ct && unlikely(nf_ct_is_dying(ct) ||
!atomic_inc_not_zero(&ct->ct_general.use)))
ct = NULL;
if (ct || cnt >= NF_CT_EVICTION_RANGE)
if (ct != NULL) {
if (likely(!nf_ct_is_dying(ct) &&
atomic_inc_not_zero(&ct->ct_general.use)))
break;
else
ct = NULL;
}

if (cnt >= NF_CT_EVICTION_RANGE)
break;

hash = (hash + 1) % nf_conntrack_htable_size;
}
rcu_read_unlock();
Expand Down

0 comments on commit d1bc261

Please sign in to comment.