All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 3/7] netns ebtables: more cleanup during ebt_unregister_table()
@ 2008-10-29 13:46 Alexey Dobriyan
  2008-11-04 13:28 ` Patrick McHardy
  0 siblings, 1 reply; 4+ messages in thread
From: Alexey Dobriyan @ 2008-10-29 13:46 UTC (permalink / raw)
  To: kaber; +Cc: netfilter-devel, containers

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>
---

 net/bridge/netfilter/ebtables.c |    4 ++++
 1 file changed, 4 insertions(+)

--- 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)

^ permalink raw reply	[flat|nested] 4+ messages in thread
* [PATCH 3/7] netns ebtables: more cleanup during ebt_unregister_table()
@ 2008-10-28 20:59 Alexey Dobriyan
  0 siblings, 0 replies; 4+ messages in thread
From: Alexey Dobriyan @ 2008-10-28 20:59 UTC (permalink / raw)
  To: kaber; +Cc: netfilter, containers

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>
---

 net/bridge/netfilter/ebtables.c |    4 ++++
 1 file changed, 4 insertions(+)

--- 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)

^ permalink raw reply	[flat|nested] 4+ messages in thread
* [PATCH 3/7] netns ebtables: more cleanup during ebt_unregister_table()
@ 2008-10-15  4:22 Alexey Dobriyan
  0 siblings, 0 replies; 4+ messages in thread
From: Alexey Dobriyan @ 2008-10-15  4:22 UTC (permalink / raw)
  To: kaber; +Cc: netfilter-devel, netdev, containers

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>
---

 net/bridge/netfilter/ebtables.c |    4 ++++
 1 file changed, 4 insertions(+)

--- a/net/bridge/netfilter/ebtables.c
+++ b/net/bridge/netfilter/ebtables.c
@@ -1216,6 +1216,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)

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2008-11-04 13:28 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-29 13:46 [PATCH 3/7] netns ebtables: more cleanup during ebt_unregister_table() Alexey Dobriyan
2008-11-04 13:28 ` Patrick McHardy
  -- strict thread matches above, loose matches on Subject: below --
2008-10-28 20:59 Alexey Dobriyan
2008-10-15  4:22 Alexey Dobriyan

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.