[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1449483206-22618-1-git-send-email-kernel@kyup.com>
Date: Mon, 7 Dec 2015 12:13:26 +0200
From: Nikolay Borisov <kernel@...p.com>
To: fruggeri@...sta.com
Cc: pablo@...filter.org, kadlec@...ckhole.kfki.hu,
netfilter-devel@...r.kernel.org, coreteam@...filter.org,
netdev@...r.kernel.org, davem@...emloft.net
Subject: [PATCH] netfilter: nfnetlink_queue: Unregister pernet subsys in case of init failure
Commit 3bfe049807c2403 ('netfilter: nfnetlink_{log,queue}:
Register pernet in first place') reorganised the initialisation
order of the pernet_subsys to avoid "use-before-initialised"
condition. However, in doing so the cleanup logic in nfnetlink_queue
got botched in that the pernet_subsys wasn't cleaned in case
nfnetlink_subsys_register failed. This patch adds the necessary
cleanup routine call.
Fixes: 3bfe049807c2403 ('netfilter: nfnetlink_{log,queue}: Register
pernet in first place')
Signed-off-by: Nikolay Borisov <kernel@...p.com>
---
net/netfilter/nfnetlink_queue.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/net/netfilter/nfnetlink_queue.c b/net/netfilter/nfnetlink_queue.c
index 7d81d280cb4f..2e94603c2dec 100644
--- a/net/netfilter/nfnetlink_queue.c
+++ b/net/netfilter/nfnetlink_queue.c
@@ -1417,6 +1417,7 @@ static int __init nfnetlink_queue_init(void)
cleanup_netlink_notifier:
netlink_unregister_notifier(&nfqnl_rtnl_notifier);
+ unregister_pernet_subsys(&nfnl_queue_net_ops);
out:
return status;
}
--
2.5.0
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists