netfilter: nf_conntrack: register pernet subsystem before register L4 proto
authorGao feng <gaofeng@cn.fujitsu.com>
Thu, 7 Mar 2013 17:20:46 +0000 (17:20 +0000)
committerPablo Neira Ayuso <pablo@netfilter.org>
Fri, 15 Mar 2013 11:29:25 +0000 (12:29 +0100)
commit0d98da5d845e0d0293055913ce65c9904b3b902a
tree7aa4b3056e3481914a8a72f752b253c9f1f3b83d
parentcca7af3889bfa343d33d5e657a38d876abd10e58
netfilter: nf_conntrack: register pernet subsystem before register L4 proto

In (c296bb4 netfilter: nf_conntrack: refactor l4proto support for netns)
the l4proto gre/dccp/udplite/sctp registration happened before the pernet
subsystem, which is wrong.

Register pernet subsystem before register L4proto since after register
L4proto, init_conntrack may try to access the resources which allocated
in register_pernet_subsys.

Reported-by: Alexey Dobriyan <adobriyan@gmail.com>
Cc: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Gao feng <gaofeng@cn.fujitsu.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/netfilter/nf_conntrack_proto_dccp.c
net/netfilter/nf_conntrack_proto_gre.c
net/netfilter/nf_conntrack_proto_sctp.c
net/netfilter/nf_conntrack_proto_udplite.c