From: Herbert Xu Date: Sun, 15 Aug 2010 05:38:09 +0000 (-0700) Subject: xfrm: Use GFP_ATOMIC in xfrm_compile_policy X-Git-Tag: v3.0~3155^2~196 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2f09a4d5daaa36690d506fafda9c24f2be866f6b;p=platform%2Fkernel%2Flinux-amlogic.git 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 Signed-off-by: Herbert Xu Signed-off-by: David S. Miller --- diff --git a/net/xfrm/xfrm_user.c b/net/xfrm/xfrm_user.c index ba59983..b14ed4b 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, if (p->dir > XFRM_POLICY_OUT) return NULL; - xp = xfrm_policy_alloc(net, GFP_KERNEL); + xp = xfrm_policy_alloc(net, GFP_ATOMIC); if (xp == NULL) { *dir = -ENOBUFS; return NULL;