Skip to content

Commit

Permalink
[XFRM]: Avoid bogus BUG() when throwing new policy away.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
YOSHIFUJI Hideaki authored and David S. Miller committed Feb 14, 2008
1 parent a4d6b8a commit 073a371
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions net/xfrm/xfrm_user.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 073a371

Please sign in to comment.