diff options
-rw-r--r-- | net/netfilter/nf_conntrack_expect.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/netfilter/nf_conntrack_expect.c b/net/netfilter/nf_conntrack_expect.c index bbb21402596d..774f32ba2ac9 100644 --- a/net/netfilter/nf_conntrack_expect.c +++ b/net/netfilter/nf_conntrack_expect.c | |||
@@ -323,7 +323,8 @@ static void nf_ct_expect_insert(struct nf_conntrack_expect *exp) | |||
323 | const struct nf_conntrack_expect_policy *p; | 323 | const struct nf_conntrack_expect_policy *p; |
324 | unsigned int h = nf_ct_expect_dst_hash(&exp->tuple); | 324 | unsigned int h = nf_ct_expect_dst_hash(&exp->tuple); |
325 | 325 | ||
326 | atomic_inc(&exp->use); | 326 | /* two references : one for hash insert, one for the timer */ |
327 | atomic_add(2, &exp->use); | ||
327 | 328 | ||
328 | if (master_help) { | 329 | if (master_help) { |
329 | hlist_add_head(&exp->lnode, &master_help->expectations); | 330 | hlist_add_head(&exp->lnode, &master_help->expectations); |
@@ -345,7 +346,6 @@ static void nf_ct_expect_insert(struct nf_conntrack_expect *exp) | |||
345 | } | 346 | } |
346 | add_timer(&exp->timeout); | 347 | add_timer(&exp->timeout); |
347 | 348 | ||
348 | atomic_inc(&exp->use); | ||
349 | NF_CT_STAT_INC(net, expect_create); | 349 | NF_CT_STAT_INC(net, expect_create); |
350 | } | 350 | } |
351 | 351 | ||