[4.2.y-ckt stable] Patch "netfilter: nfnetlink_queue: Unregister pernet subsys in case of init failure" has been added to the 4.2.y-ckt tree

Kamal Mostafa kamal at canonical.com
Fri Jan 15 23:58:03 UTC 2016


This is a note to let you know that I have just added a patch titled

    netfilter: nfnetlink_queue: Unregister pernet subsys in case of init failure

to the linux-4.2.y-queue branch of the 4.2.y-ckt extended stable tree 
which can be found at:

    http://kernel.ubuntu.com/git/ubuntu/linux.git/log/?h=linux-4.2.y-queue

This patch is scheduled to be released in version 4.2.8-ckt2.

If you, or anyone else, feels it should not be added to this tree, please 
reply to this email.

For more information about the 4.2.y-ckt tree, see
https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable

Thanks.
-Kamal

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

>From 53c448321da7f365c8741988f6d96ea0f99680c4 Mon Sep 17 00:00:00 2001
From: Nikolay Borisov <kernel at kyup.com>
Date: Mon, 7 Dec 2015 12:13:26 +0200
Subject: netfilter: nfnetlink_queue: Unregister pernet subsys in case of init
 failure

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 at kyup.com>
Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
[ kamal: backport to 4.2-stable: appled to nfnetlink_queue_core.c ]
Signed-off-by: Kamal Mostafa <kamal at 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





More information about the kernel-team mailing list