netfilter: nfnetlink_queue: Unregister pernet subsys in case of init failure
Subsystems (3)
PATCH 1/1 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.
pernet in first place')
--- net/netfilter/nfnetlink_queue.c | 1 + 1 file changed, 1 insertion(+)
net/netfilter/nfnetlink_queue.c +1 -0
@@ -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; }
Signature · 1 line
2.5.0
Hello.
Quoted 1 line · Nikolay Borisov
Commit
3bfe049807c2403('netfilter: nfnetlink_{log,queue}:
Double quotes please, that's what scripts/checkpatch.pl enforces now.
Quoted 9 lines
Register pernet in first place') reorganised the initialisation order of the
pernet_subsysto avoid "use-before-initialised" condition. However, in doing so the cleanup logic innfnetlink_queuegot botched in that thepernet_subsyswasn't cleaned in casenfnetlink_subsys_registerfailed. This patch adds the necessary cleanup routine call.Fixes 3bfe049807c2403 ('netfilter: nfnetlink_{log,queue}: Registerpernet in first place')
Likewise.
Quoted 2 lines
Signed-off-by Nikolay Borisov <[email protected]>
[...]
MBR, Sergei
Quoted 15 lines · Sergei Shtylyov
Hello.
Quoted 1 line · Nikolay Borisov
Commit
3bfe049807c2403('netfilter: nfnetlink_{log,queue}:Double quotes please, that's what
scripts/checkpatch.plenforces now.Quoted 7 lines
Register pernet in first place') reorganised the initialisation order of the
pernet_subsysto avoid "use-before-initialised" condition. However, in doing so the cleanup logic innfnetlink_queuegot botched in that thepernet_subsyswasn't cleaned in casenfnetlink_subsys_registerfailed. This patch adds the necessary cleanup routine call.
Quoted 4 lines
Quoted 2 lines
Fixes 3bfe049807c2403 ('netfilter: nfnetlink_{log,queue}: Registerpernet in first place')
Likewise.
I will resend it with proper quotes (even though I think this is a minor issue) but I'd like to first gather some review feedback.
Also I dunno if this should be marked for stable.
Quoted 8 lines
Quoted 3 lines
Signed-off-by Nikolay Borisov <[email protected]>[...]
MBR, Sergei
Pablo Neira Ayuso
maintainerQuoted 18 lines · Nikolay Borisov
Quoted 15 lines · Sergei Shtylyov
Hello.
Quoted 1 line · Nikolay Borisov
Commit
3bfe049807c2403('netfilter: nfnetlink_{log,queue}:Double quotes please, that's what
scripts/checkpatch.plenforces now.Quoted 7 lines
Register pernet in first place') reorganised the initialisation order of the
pernet_subsysto avoid "use-before-initialised" condition. However, in doing so the cleanup logic innfnetlink_queuegot botched in that thepernet_subsyswasn't cleaned in casenfnetlink_subsys_registerfailed. This patch adds the necessary cleanup routine call.
Quoted 7 lines
Quoted 4 lines
Quoted 2 lines
Fixes 3bfe049807c2403 ('netfilter: nfnetlink_{log,queue}: Registerpernet in first place')
Likewise.
I will resend it with proper quotes (even though I think this is a minor issue) but I'd like to first gather some review feedback.
Unless someone spots any other more relevant problem with this, I'll fix this comestic issues here, no need to resend.
Quoted 1 line
Also I dunno if this should be marked for stable.
Yes, this qualifies for -stable, will take care of that.
Thanks.
Quoted 22 lines · Pablo Neira Ayuso
Quoted 21 lines · Nikolay Borisov
Quoted 18 lines · Sergei Shtylyov
Hello.
Quoted 1 line · Nikolay Borisov
Commit
3bfe049807c2403('netfilter: nfnetlink_{log,queue}:Double quotes please, that's what
scripts/checkpatch.plenforces now.Quoted 9 lines
Register pernet in first place') reorganised the initialisation order of the
pernet_subsysto avoid "use-before-initialised" condition. However, in doing so the cleanup logic innfnetlink_queuegot botched in that thepernet_subsyswasn't cleaned in casenfnetlink_subsys_registerfailed. This patch adds the necessary cleanup routine call.Fixes 3bfe049807c2403 ('netfilter: nfnetlink_{log,queue}: Registerpernet in first place')
Quoted 7 lines
Quoted 4 lines
Quoted 1 line
Likewise.
I will resend it with proper quotes (even though I think this is a minor issue) but I'd like to first gather some review feedback.
Unless someone spots any other more relevant problem with this, I'll fix this comestic issues here, no need to resend.
Applied, thanks.