Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 154101
b: refs/heads/master
c: 8d8890b
h: refs/heads/master
i:
  154099: 6bdd416
v: v3
  • Loading branch information
Patrick McHardy committed Jun 22, 2009
1 parent 7401a86 commit d7c6c88
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 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: 5c8ec910e789a92229978d8fd1fce7b62e8ac711
refs/heads/master: 8d8890b7751387f58ce0a6428773de2fbc0fd596
6 changes: 4 additions & 2 deletions trunk/net/netfilter/nf_conntrack_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,8 @@ nf_conntrack_find_get(struct net *net, const struct nf_conntrack_tuple *tuple)
h = __nf_conntrack_find(net, tuple);
if (h) {
ct = nf_ct_tuplehash_to_ctrack(h);
if (unlikely(!atomic_inc_not_zero(&ct->ct_general.use)))
if (unlikely(nf_ct_is_dying(ct) ||
!atomic_inc_not_zero(&ct->ct_general.use)))
h = NULL;
else {
if (unlikely(!nf_ct_tuple_equal(tuple, &h->tuple))) {
Expand Down Expand Up @@ -510,7 +511,8 @@ static noinline int early_drop(struct net *net, unsigned int hash)
cnt++;
}

if (ct && unlikely(!atomic_inc_not_zero(&ct->ct_general.use)))
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)
break;
Expand Down

0 comments on commit d7c6c88

Please sign in to comment.