summaryrefslogtreecommitdiffstats
path: root/net/bridge
diff options
context:
space:
mode:
authorAlexey Dobriyan <adobriyan@gmail.com>2008-11-04 14:28:04 +0100
committerPatrick McHardy <kaber@trash.net>2008-11-04 14:28:04 +0100
commitdbcdf85a2e3d2aa584dafd10b5a1f42764e673e7 (patch)
tree29617f12a38ed6ca37f9246336916a2909ac2312 /net/bridge
parent6beceee5aa2cb94c4ae9f0784c7d3135d343f5b5 (diff)
downloadop-kernel-dev-dbcdf85a2e3d2aa584dafd10b5a1f42764e673e7.zip
op-kernel-dev-dbcdf85a2e3d2aa584dafd10b5a1f42764e673e7.tar.gz
netfilter: netns ebtables: more cleanup during ebt_unregister_table()
Now that ebt_unregister_table() can be called during netns stop, and module pinning scheme can't prevent netns stop, do table cleanup by hand. Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Patrick McHardy <kaber@trash.net>
Diffstat (limited to 'net/bridge')
-rw-r--r--net/bridge/netfilter/ebtables.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/net/bridge/netfilter/ebtables.c b/net/bridge/netfilter/ebtables.c
index 82e1752..fa108c4 100644
--- a/net/bridge/netfilter/ebtables.c
+++ b/net/bridge/netfilter/ebtables.c
@@ -1209,6 +1209,10 @@ void ebt_unregister_table(struct ebt_table *table)
mutex_lock(&ebt_mutex);
list_del(&table->list);
mutex_unlock(&ebt_mutex);
+ EBT_ENTRY_ITERATE(table->private->entries, table->private->entries_size,
+ ebt_cleanup_entry, NULL);
+ if (table->private->nentries)
+ module_put(table->me);
vfree(table->private->entries);
if (table->private->chainstack) {
for_each_possible_cpu(i)
OpenPOWER on IntegriCloud