aboutsummaryrefslogtreecommitdiffstats
path: root/net/key/af_key.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2010-02-03 22:38:22 -0500
committerDavid S. Miller <davem@davemloft.net>2010-02-03 22:38:22 -0500
commit9c119ba54c0fcae72881948af3d37b47a2f8e1f9 (patch)
tree0be51b0bf02ece3bb32955e9d33a3998ecd57250 /net/key/af_key.c
parenta4b97f2054af2e411c414ed4cb5e1d0dbfd24a47 (diff)
parentfdd3d631cddad20ad9d3e1eb7dbf26825a8a121f (diff)
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Diffstat (limited to 'net/key/af_key.c')
-rw-r--r--net/key/af_key.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/net/key/af_key.c b/net/key/af_key.c
index e2aacf0ba013..41dd2cb07ef3 100644
--- a/net/key/af_key.c
+++ b/net/key/af_key.c
@@ -3793,9 +3793,9 @@ static struct pernet_operations pfkey_net_ops = {
3793 3793
3794static void __exit ipsec_pfkey_exit(void) 3794static void __exit ipsec_pfkey_exit(void)
3795{ 3795{
3796 unregister_pernet_subsys(&pfkey_net_ops);
3797 xfrm_unregister_km(&pfkeyv2_mgr); 3796 xfrm_unregister_km(&pfkeyv2_mgr);
3798 sock_unregister(PF_KEY); 3797 sock_unregister(PF_KEY);
3798 unregister_pernet_subsys(&pfkey_net_ops);
3799 proto_unregister(&key_proto); 3799 proto_unregister(&key_proto);
3800} 3800}
3801 3801
@@ -3806,21 +3806,22 @@ static int __init ipsec_pfkey_init(void)
3806 if (err != 0) 3806 if (err != 0)
3807 goto out; 3807 goto out;
3808 3808
3809 err = sock_register(&pfkey_family_ops); 3809 err = register_pernet_subsys(&pfkey_net_ops);
3810 if (err != 0) 3810 if (err != 0)
3811 goto out_unregister_key_proto; 3811 goto out_unregister_key_proto;
3812 err = sock_register(&pfkey_family_ops);
3813 if (err != 0)
3814 goto out_unregister_pernet;
3812 err = xfrm_register_km(&pfkeyv2_mgr); 3815 err = xfrm_register_km(&pfkeyv2_mgr);
3813 if (err != 0) 3816 if (err != 0)
3814 goto out_sock_unregister; 3817 goto out_sock_unregister;
3815 err = register_pernet_subsys(&pfkey_net_ops);
3816 if (err != 0)
3817 goto out_xfrm_unregister_km;
3818out: 3818out:
3819 return err; 3819 return err;
3820out_xfrm_unregister_km: 3820
3821 xfrm_unregister_km(&pfkeyv2_mgr);
3822out_sock_unregister: 3821out_sock_unregister:
3823 sock_unregister(PF_KEY); 3822 sock_unregister(PF_KEY);
3823out_unregister_pernet:
3824 unregister_pernet_subsys(&pfkey_net_ops);
3824out_unregister_key_proto: 3825out_unregister_key_proto:
3825 proto_unregister(&key_proto); 3826 proto_unregister(&key_proto);
3826 goto out; 3827 goto out;