diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2010-08-15 01:38:09 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-08-15 01:38:09 -0400 |
commit | 2f09a4d5daaa36690d506fafda9c24f2be866f6b (patch) | |
tree | 3ad73903ae199c4bc47d029fed7f346ce6406b25 /net | |
parent | 3c09e2647b5e1f1f9fd383971468823c2505e1b0 (diff) |
xfrm: Use GFP_ATOMIC in xfrm_compile_policy
As xfrm_compile_policy runs within a read_lock, we cannot use
GFP_KERNEL for memory allocations.
Reported-by: Luca Tettamanti <kronos.it@gmail.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/xfrm/xfrm_user.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/xfrm/xfrm_user.c b/net/xfrm/xfrm_user.c index ba59983aaffe..b14ed4b1f27c 100644 --- a/net/xfrm/xfrm_user.c +++ b/net/xfrm/xfrm_user.c | |||
@@ -2504,7 +2504,7 @@ static struct xfrm_policy *xfrm_compile_policy(struct sock *sk, int opt, | |||
2504 | if (p->dir > XFRM_POLICY_OUT) | 2504 | if (p->dir > XFRM_POLICY_OUT) |
2505 | return NULL; | 2505 | return NULL; |
2506 | 2506 | ||
2507 | xp = xfrm_policy_alloc(net, GFP_KERNEL); | 2507 | xp = xfrm_policy_alloc(net, GFP_ATOMIC); |
2508 | if (xp == NULL) { | 2508 | if (xp == NULL) { |
2509 | *dir = -ENOBUFS; | 2509 | *dir = -ENOBUFS; |
2510 | return NULL; | 2510 | return NULL; |