diff options
author | Alexey Dobriyan <adobriyan@gmail.com> | 2008-11-04 14:28:04 +0100 |
---|---|---|
committer | Patrick McHardy <kaber@trash.net> | 2008-11-04 14:28:04 +0100 |
commit | dbcdf85a2e3d2aa584dafd10b5a1f42764e673e7 (patch) | |
tree | 29617f12a38ed6ca37f9246336916a2909ac2312 /net/bridge | |
parent | 6beceee5aa2cb94c4ae9f0784c7d3135d343f5b5 (diff) |
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.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/net/bridge/netfilter/ebtables.c b/net/bridge/netfilter/ebtables.c index 82e17527e21..fa108c46e85 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) |