From: YOSHIFUJI Hideaki Date: Thu, 14 Feb 2008 22:52:38 +0000 (-0800) Subject: [XFRM]: Avoid bogus BUG() when throwing new policy away. X-Git-Tag: firefly_0821_release~22269^2~66 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=073a371987f9a9806a85329eed51dca1fc52a7a0;p=firefly-linux-kernel-4.4.55.git [XFRM]: Avoid bogus BUG() when throwing new policy away. From: YOSHIFUJI Hideaki When we destory a new policy entry, we need to tell xfrm_policy_destroy() explicitly that the entry is not alive yet. Signed-off-by: David S. Miller --- diff --git a/net/xfrm/xfrm_user.c b/net/xfrm/xfrm_user.c index 78338079b7f5..f971ca5645f8 100644 --- a/net/xfrm/xfrm_user.c +++ b/net/xfrm/xfrm_user.c @@ -1105,6 +1105,7 @@ static struct xfrm_policy *xfrm_policy_construct(struct xfrm_userpolicy_info *p, return xp; error: *errp = err; + xp->dead = 1; xfrm_policy_destroy(xp); return NULL; }