]> git.baikalelectronics.ru Git - kernel.git/commit
netfilter: nf_tables: fix chain type module reference handling
authorPatrick McHardy <kaber@trash.net>
Thu, 9 Jan 2014 18:42:34 +0000 (18:42 +0000)
committerPablo Neira Ayuso <pablo@netfilter.org>
Thu, 9 Jan 2014 19:17:14 +0000 (20:17 +0100)
commitfeb555a93306b58bd1f5845a124162c67e6dcf0e
tree706f332147b442369fd5e8219fad73dae2c80a4e
parent1b586dcaa69e3b5ca11567d9c387be35dfd4f9ea
netfilter: nf_tables: fix chain type module reference handling

The chain type module reference handling makes no sense at all: we take
a reference immediately when the module is registered, preventing the
module from ever being unloaded.

Fix by taking a reference when we're actually creating a chain of the
chain type and release the reference when destroying the chain.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
include/net/netfilter/nf_tables.h
net/netfilter/nf_tables_api.c