[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <61e8259a-862a-3b3a-1cc6-ab1177c0c9a4@virtuozzo.com>
Date: Mon, 6 Nov 2017 16:24:35 +0300
From: Vasily Averin <vvs@...tuozzo.com>
To: netdev@...r.kernel.org
Subject: [PATCH v3 10/21] fib_rules: exit_net cleanup check added
Be sure that rules_ops list initialized in net_init hook was return
to initial state.
Signed-off-by: Vasily Averin <vvs@...tuozzo.com>
---
net/core/fib_rules.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/net/core/fib_rules.c b/net/core/fib_rules.c
index 9a6d97c..0049272 100644
--- a/net/core/fib_rules.c
+++ b/net/core/fib_rules.c
@@ -1019,8 +1019,16 @@ static int __net_init fib_rules_net_init(struct net *net)
return 0;
}
+static void __net_exit fib_rules_net_exit(struct net *net)
+{
+ WARN_ONCE(!list_empty(&net->rules_ops),
+ "net %x %s: rules_ops list is not empty\n",
+ net->ns.inum, __func__);
+}
+
static struct pernet_operations fib_rules_net_ops = {
.init = fib_rules_net_init,
+ .exit = fib_rules_net_exit,
};
static int __init fib_rules_init(void)
--
2.7.4
Powered by blists - more mailing lists