diff options
author | Florian Westphal <fw@strlen.de> | 2015-10-13 14:33:26 +0200 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2015-10-16 18:21:39 +0200 |
commit | 2ffbceb2b08f8ca0496c54a9ebcd11d25275954e (patch) | |
tree | f4da28636d8583f4817b4e374c8e78eba2b822b5 /net/netfilter/nf_queue.c | |
parent | 8cbc870829ecd8f1062f2a756683c80e2d1eae7f (diff) | |
download | linux-stable-2ffbceb2b08f8ca0496c54a9ebcd11d25275954e.tar.gz linux-stable-2ffbceb2b08f8ca0496c54a9ebcd11d25275954e.tar.bz2 linux-stable-2ffbceb2b08f8ca0496c54a9ebcd11d25275954e.zip |
netfilter: remove hook owner refcounting
since commit 8405a8fff3f8 ("netfilter: nf_qeueue: Drop queue entries on
nf_unregister_hook") all pending queued entries are discarded.
So we can simply remove all of the owner handling -- when module is
removed it also needs to unregister all its hooks.
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'net/netfilter/nf_queue.c')
-rw-r--r-- | net/netfilter/nf_queue.c | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/net/netfilter/nf_queue.c b/net/netfilter/nf_queue.c index 634d18e6ab2c..eef1c50e0e21 100644 --- a/net/netfilter/nf_queue.c +++ b/net/netfilter/nf_queue.c @@ -69,8 +69,6 @@ void nf_queue_entry_release_refs(struct nf_queue_entry *entry) dev_put(physdev); } #endif - /* Drop reference to owner of hook which queued us. */ - module_put(entry->elem->owner); } EXPORT_SYMBOL_GPL(nf_queue_entry_release_refs); @@ -79,9 +77,6 @@ bool nf_queue_entry_get_refs(struct nf_queue_entry *entry) { struct nf_hook_state *state = &entry->state; - if (!try_module_get(entry->elem->owner)) - return false; - if (state->in) dev_hold(state->in); if (state->out) |