diff options
author | Alexey Dobriyan <adobriyan@gmail.com> | 2008-11-04 08:28:04 -0500 |
---|---|---|
committer | Patrick McHardy <kaber@trash.net> | 2008-11-04 08:28:04 -0500 |
commit | dbcdf85a2e3d2aa584dafd10b5a1f42764e673e7 (patch) | |
tree | 29617f12a38ed6ca37f9246336916a2909ac2312 | |
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>
-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 82e17527e21e..fa108c46e851 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) | |||
1209 | mutex_lock(&ebt_mutex); | 1209 | mutex_lock(&ebt_mutex); |
1210 | list_del(&table->list); | 1210 | list_del(&table->list); |
1211 | mutex_unlock(&ebt_mutex); | 1211 | mutex_unlock(&ebt_mutex); |
1212 | EBT_ENTRY_ITERATE(table->private->entries, table->private->entries_size, | ||
1213 | ebt_cleanup_entry, NULL); | ||
1214 | if (table->private->nentries) | ||
1215 | module_put(table->me); | ||
1212 | vfree(table->private->entries); | 1216 | vfree(table->private->entries); |
1213 | if (table->private->chainstack) { | 1217 | if (table->private->chainstack) { |
1214 | for_each_possible_cpu(i) | 1218 | for_each_possible_cpu(i) |