diff options
author | David S. Miller <davem@davemloft.net> | 2010-02-03 19:38:22 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-02-03 19:38:22 -0800 |
commit | 9c119ba54c0fcae72881948af3d37b47a2f8e1f9 (patch) | |
tree | 0be51b0bf02ece3bb32955e9d33a3998ecd57250 /net/key | |
parent | a4b97f2054af2e411c414ed4cb5e1d0dbfd24a47 (diff) | |
parent | fdd3d631cddad20ad9d3e1eb7dbf26825a8a121f (diff) | |
download | linux-3.10-9c119ba54c0fcae72881948af3d37b47a2f8e1f9.tar.gz linux-3.10-9c119ba54c0fcae72881948af3d37b47a2f8e1f9.tar.bz2 linux-3.10-9c119ba54c0fcae72881948af3d37b47a2f8e1f9.zip |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Diffstat (limited to 'net/key')
-rw-r--r-- | net/key/af_key.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/net/key/af_key.c b/net/key/af_key.c index e2aacf0ba01..41dd2cb07ef 100644 --- a/net/key/af_key.c +++ b/net/key/af_key.c @@ -3793,9 +3793,9 @@ static struct pernet_operations pfkey_net_ops = { static void __exit ipsec_pfkey_exit(void) { - unregister_pernet_subsys(&pfkey_net_ops); xfrm_unregister_km(&pfkeyv2_mgr); sock_unregister(PF_KEY); + unregister_pernet_subsys(&pfkey_net_ops); proto_unregister(&key_proto); } @@ -3806,21 +3806,22 @@ static int __init ipsec_pfkey_init(void) if (err != 0) goto out; - err = sock_register(&pfkey_family_ops); + err = register_pernet_subsys(&pfkey_net_ops); if (err != 0) goto out_unregister_key_proto; + err = sock_register(&pfkey_family_ops); + if (err != 0) + goto out_unregister_pernet; err = xfrm_register_km(&pfkeyv2_mgr); if (err != 0) goto out_sock_unregister; - err = register_pernet_subsys(&pfkey_net_ops); - if (err != 0) - goto out_xfrm_unregister_km; out: return err; -out_xfrm_unregister_km: - xfrm_unregister_km(&pfkeyv2_mgr); + out_sock_unregister: sock_unregister(PF_KEY); +out_unregister_pernet: + unregister_pernet_subsys(&pfkey_net_ops); out_unregister_key_proto: proto_unregister(&key_proto); goto out; |