diff options
author | Alexey Dobriyan <adobriyan@sw.ru> | 2008-01-31 12:05:34 (GMT) |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-02-01 03:27:41 (GMT) |
commit | df200969b1627e8f1cda7ce8c0707863f91bb81b (patch) | |
tree | 3dbc2d882177568f8c0047b5e10597af12599f67 /net/ipv4/netfilter/arp_tables.c | |
parent | 9ea0cb2601c4747dff758a9a7a5a4a433ad527f3 (diff) | |
download | linux-fsl-qoriq-df200969b1627e8f1cda7ce8c0707863f91bb81b.tar.xz |
[NETFILTER]: netns: put table module on netns stop
When number of entries exceeds number of initial entries, foo-tables code
will pin table module. But during table unregister on netns stop,
that additional pin was forgotten.
Signed-off-by: Alexey Dobriyan <adobriyan@sw.ru>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/netfilter/arp_tables.c')
-rw-r--r-- | net/ipv4/netfilter/arp_tables.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/net/ipv4/netfilter/arp_tables.c b/net/ipv4/netfilter/arp_tables.c index ec64b67..3608675 100644 --- a/net/ipv4/netfilter/arp_tables.c +++ b/net/ipv4/netfilter/arp_tables.c @@ -1773,6 +1773,7 @@ void arpt_unregister_table(struct arpt_table *table) { struct xt_table_info *private; void *loc_cpu_entry; + struct module *table_owner = table->me; private = xt_unregister_table(table); @@ -1780,6 +1781,8 @@ void arpt_unregister_table(struct arpt_table *table) loc_cpu_entry = private->entries[raw_smp_processor_id()]; ARPT_ENTRY_ITERATE(loc_cpu_entry, private->size, cleanup_entry, NULL); + if (private->number > private->initial_entries) + module_put(table_owner); xt_free_table_info(private); } |