Skip to content

Commit

Permalink
netfilter: xt_CT: don't put back reference to timeout policy object
Browse files Browse the repository at this point in the history
On success, this shouldn't put back the timeout policy object, otherwise
we may have module refcount overflow and we allow deletion of timeout
that are still in use.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
  • Loading branch information
Pablo Neira Ayuso committed Oct 12, 2015
1 parent a29a9a5 commit 403d89a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions net/netfilter/xt_CT.c
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,9 @@ xt_ct_set_timeout(struct nf_conn *ct, const struct xt_tgchk_param *par,
if (timeout_ext == NULL)
ret = -ENOMEM;

rcu_read_unlock();
return ret;

err_put_timeout:
__xt_ct_tg_timeout_put(timeout);
out:
Expand Down

0 comments on commit 403d89a

Please sign in to comment.