Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1310597

[PATCH 4.2.y-ckt 273/305] netfilter: nfnetlink_queue: Unregister pernet subsys in case of init failure

Path csiph.com!aioe.org!bofh.it!news.nic.it!robomod
From Kamal Mostafa <kamal@canonical.com>
Newsgroups linux.kernel
Subject [PATCH 4.2.y-ckt 273/305] netfilter: nfnetlink_queue: Unregister pernet subsys in case of init failure
Date Sat, 16 Jan 2016 01:20:03 +0100
Message-ID <qRmL0-54G-29@gated-at.bofh.it> (permalink)
References <qRmBj-507-3@gated-at.bofh.it>
X-Original-To linux-kernel@vger.kernel.org, stable@vger.kernel.org, kernel-team@lists.ubuntu.com
X-Mailer git-send-email 1.9.1
X-Extended-Stable 4.2
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 39
Organization linux.* mail to news gateway
X-Original-Cc Nikolay Borisov <kernel@kyup.com>, Pablo Neira Ayuso <pablo@netfilter.org>, Kamal Mostafa <kamal@canonical.com>
X-Original-Date Fri, 15 Jan 2016 16:01:27 -0800
X-Original-Message-ID <1452902519-2754-274-git-send-email-kamal@canonical.com>
X-Original-References <1452902519-2754-1-git-send-email-kamal@canonical.com>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1310597

Show key headers only | View raw


4.2.8-ckt2 -stable review patch.  If anyone has any objections, please let me know.

---8<------------------------------------------------------------

From: Nikolay Borisov <kernel@kyup.com>

commit 639e077b43d9c54ffb1e1b54a2de54597ceae1d8 upstream.

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@kyup.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
[ kamal: backport to 4.2-stable: appled to nfnetlink_queue_core.c ]
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
---
 net/netfilter/nfnetlink_queue_core.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/net/netfilter/nfnetlink_queue_core.c b/net/netfilter/nfnetlink_queue_core.c
index a5cd6d9..2bfb1fd 100644
--- a/net/netfilter/nfnetlink_queue_core.c
+++ b/net/netfilter/nfnetlink_queue_core.c
@@ -1392,6 +1392,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;
 }
-- 
1.9.1

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

[PATCH 4.2.y-ckt 273/305] netfilter: nfnetlink_queue: Unregister pernet subsys in case of init failure Kamal Mostafa <kamal@canonical.com> - 2016-01-16 01:20 +0100

csiph-web