All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 07/21] fib_notifier: exit_net cleanup check added
@ 2017-11-05 10:00 Vasily Averin
  0 siblings, 0 replies; only message in thread
From: Vasily Averin @ 2017-11-05 10:00 UTC (permalink / raw)
  To: netdev

Be sure that fib_notifier_ops list initilized in net_init hook was return
to initial state.

Signed-off-by: Vasily Averin <vvs@virtuozzo.com>
---
 net/core/fib_notifier.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/net/core/fib_notifier.c b/net/core/fib_notifier.c
index 4fc202d..2de8df3 100644
--- a/net/core/fib_notifier.c
+++ b/net/core/fib_notifier.c
@@ -161,8 +161,15 @@ static int __net_init fib_notifier_net_init(struct net *net)
 	return 0;
 }
 
+static void __net_exit fib_notifier_net_exit(struct net *net)
+{
+	WARN(!list_empty(&net->fib_notifier_ops),
+	     "net %p exit: fib_notifier_ops list is not empty\n", net);
+}
+
 static struct pernet_operations fib_notifier_net_ops = {
 	.init = fib_notifier_net_init,
+	.exit = fib_notifier_net_exit,
 };
 
 static int __init fib_notifier_init(void)
-- 
2.7.4

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2017-11-05 10:00 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-05 10:00 [PATCH 07/21] fib_notifier: exit_net cleanup check added Vasily Averin

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.