Răsfoiți Sursa

[XFRM]: Avoid bogus BUG() when throwing new policy away.

From: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>

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 <davem@davemloft.net>
YOSHIFUJI Hideaki 17 ani în urmă
părinte
comite
073a371987
1 a modificat fișierele cu 1 adăugiri și 0 ștergeri
  1. 1 0
      net/xfrm/xfrm_user.c

+ 1 - 0
net/xfrm/xfrm_user.c

@@ -1105,6 +1105,7 @@ static struct xfrm_policy *xfrm_policy_construct(struct xfrm_userpolicy_info *p,
 	return xp;
 	return xp;
  error:
  error:
 	*errp = err;
 	*errp = err;
+	xp->dead = 1;
 	xfrm_policy_destroy(xp);
 	xfrm_policy_destroy(xp);
 	return NULL;
 	return NULL;
 }
 }