diff options
Diffstat (limited to 'net/key')
-rw-r--r-- | net/key/af_key.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/key/af_key.c b/net/key/af_key.c index f202ba6c8dcb..036315d6b665 100644 --- a/net/key/af_key.c +++ b/net/key/af_key.c | |||
@@ -2174,7 +2174,7 @@ static int pfkey_spdadd(struct sock *sk, struct sk_buff *skb, struct sadb_msg *h | |||
2174 | if (!pol->sadb_x_policy_dir || pol->sadb_x_policy_dir >= IPSEC_DIR_MAX) | 2174 | if (!pol->sadb_x_policy_dir || pol->sadb_x_policy_dir >= IPSEC_DIR_MAX) |
2175 | return -EINVAL; | 2175 | return -EINVAL; |
2176 | 2176 | ||
2177 | xp = xfrm_policy_alloc(GFP_KERNEL); | 2177 | xp = xfrm_policy_alloc(&init_net, GFP_KERNEL); |
2178 | if (xp == NULL) | 2178 | if (xp == NULL) |
2179 | return -ENOBUFS; | 2179 | return -ENOBUFS; |
2180 | 2180 | ||
@@ -3141,7 +3141,7 @@ static struct xfrm_policy *pfkey_compile_policy(struct sock *sk, int opt, | |||
3141 | (!pol->sadb_x_policy_dir || pol->sadb_x_policy_dir > IPSEC_DIR_OUTBOUND)) | 3141 | (!pol->sadb_x_policy_dir || pol->sadb_x_policy_dir > IPSEC_DIR_OUTBOUND)) |
3142 | return NULL; | 3142 | return NULL; |
3143 | 3143 | ||
3144 | xp = xfrm_policy_alloc(GFP_ATOMIC); | 3144 | xp = xfrm_policy_alloc(&init_net, GFP_ATOMIC); |
3145 | if (xp == NULL) { | 3145 | if (xp == NULL) { |
3146 | *dir = -ENOBUFS; | 3146 | *dir = -ENOBUFS; |
3147 | return NULL; | 3147 | return NULL; |