aboutsummaryrefslogtreecommitdiffstats
path: root/net/xfrm/xfrm_policy.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/xfrm/xfrm_policy.c')
-rw-r--r--net/xfrm/xfrm_policy.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/net/xfrm/xfrm_policy.c b/net/xfrm/xfrm_policy.c
index a75fae4b045a..f02f511b7107 100644
--- a/net/xfrm/xfrm_policy.c
+++ b/net/xfrm/xfrm_policy.c
@@ -2913,15 +2913,19 @@ static int __net_init xfrm_net_init(struct net *net)
2913 rv = xfrm_sysctl_init(net); 2913 rv = xfrm_sysctl_init(net);
2914 if (rv < 0) 2914 if (rv < 0)
2915 goto out_sysctl; 2915 goto out_sysctl;
2916 rv = flow_cache_init(net);
2917 if (rv < 0)
2918 goto out;
2916 2919
2917 /* Initialize the per-net locks here */ 2920 /* Initialize the per-net locks here */
2918 spin_lock_init(&net->xfrm.xfrm_state_lock); 2921 spin_lock_init(&net->xfrm.xfrm_state_lock);
2919 rwlock_init(&net->xfrm.xfrm_policy_lock); 2922 rwlock_init(&net->xfrm.xfrm_policy_lock);
2920 mutex_init(&net->xfrm.xfrm_cfg_mutex); 2923 mutex_init(&net->xfrm.xfrm_cfg_mutex);
2921 2924
2922 flow_cache_init(net);
2923 return 0; 2925 return 0;
2924 2926
2927out:
2928 xfrm_sysctl_fini(net);
2925out_sysctl: 2929out_sysctl:
2926 xfrm_policy_fini(net); 2930 xfrm_policy_fini(net);
2927out_policy: 2931out_policy:
@@ -2934,6 +2938,7 @@ out_statistics:
2934 2938
2935static void __net_exit xfrm_net_exit(struct net *net) 2939static void __net_exit xfrm_net_exit(struct net *net)
2936{ 2940{
2941 flow_cache_fini(net);
2937 xfrm_sysctl_fini(net); 2942 xfrm_sysctl_fini(net);
2938 xfrm_policy_fini(net); 2943 xfrm_policy_fini(net);
2939 xfrm_state_fini(net); 2944 xfrm_state_fini(net);