|
@@ -3062,6 +3062,11 @@ static int __net_init xfrm_net_init(struct net *net)
|
|
|
{
|
|
|
int rv;
|
|
|
|
|
|
+ /* Initialize the per-net locks here */
|
|
|
+ spin_lock_init(&net->xfrm.xfrm_state_lock);
|
|
|
+ spin_lock_init(&net->xfrm.xfrm_policy_lock);
|
|
|
+ mutex_init(&net->xfrm.xfrm_cfg_mutex);
|
|
|
+
|
|
|
rv = xfrm_statistics_init(net);
|
|
|
if (rv < 0)
|
|
|
goto out_statistics;
|
|
@@ -3078,11 +3083,6 @@ static int __net_init xfrm_net_init(struct net *net)
|
|
|
if (rv < 0)
|
|
|
goto out;
|
|
|
|
|
|
- /* Initialize the per-net locks here */
|
|
|
- spin_lock_init(&net->xfrm.xfrm_state_lock);
|
|
|
- spin_lock_init(&net->xfrm.xfrm_policy_lock);
|
|
|
- mutex_init(&net->xfrm.xfrm_cfg_mutex);
|
|
|
-
|
|
|
return 0;
|
|
|
|
|
|
out:
|