[Devel] [PATCH 2/6] netns brnetfilter: cleanup during table unregister

adobriyan at gmail.com adobriyan at gmail.com
Thu Aug 21 15:21:26 PDT 2008


So far it wasn't needed, because modules were pinned just right to prevent ebtables from
unloading when cleanup was necessary.

ebt_unregster_table() is called during netns stop now, so...

Signed-off-by: Alexey Dobriyan <adobriyan at gmail.com>
---

 net/bridge/netfilter/ebtables.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

--- a/net/bridge/netfilter/ebtables.c
+++ b/net/bridge/netfilter/ebtables.c
@@ -1262,6 +1262,8 @@ 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);
 	vfree(table->private->entries);
 	if (table->private->chainstack) {
 		for_each_possible_cpu(i)
-- 
1.5.6.3


_______________________________________________
Containers mailing list
Containers at lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers




More information about the Devel mailing list