fix bug in spdadd
Subsystems (3)
PATCH 1/1 fix bug in spdadd
This patch fix a BUG when adding spds which have
same selector.
--
Kazunori Miyazawa
net/key/af_key.c +1 -0
@@ -2291,6 +2291,7 @@ static int pfkey_spdadd(struct sock *sk, struct sk_buff *skb, struct sadb_msg *hreturn 0 ; out: + xp->dead =1 ;xfrm_policy_destroy (xp);return err; }
In article <[email protected]> (at Thu, 14 Feb 2008 20:55:40 +0900), Kazunori MIYAZAWA <[email protected]> says:
Quoted 4 lines
This patch fix a BUG when adding spds which have
same selector.Signed-off-by Kazunori MIYAZAWA <[email protected]>
I think we need to fix xfrm_user side as well.
---
[PATCH] [XFRM]: Avoid bogus BUG() when throwing new policy away.
When we destory a new policy entry, we need to tell xfrm_policy_destroy() explicitly that the entry is not alive yet.
---
net/xfrm/xfrm_user.c +1 -0
@@ -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 ; }
Signature · 2 lines
YOSHIFUJI Hideaki @ USAGI Project <[email protected]> GPG-FP : 9022 65EB 1ECF 3AD1 0BDF 80D8 4807 F894 E062 0EEA
From: YOSHIFUJI Hideaki / 吉藤英明 <[email protected]>
Date: Fri, 15 Feb 2008 01:54:05 +1100 (EST)
Quoted 5 lines
[PATCH] [XFRM]: Avoid bogus
BUG()when throwing new policy away.When we destory a new policy entry, we need to tell
xfrm_policy_destroy()explicitly that the entry is not alive yet.
Applied.
Please provide a proper Signed-off-by: next time.
Thank you!
From: Kazunori MIYAZAWA <[email protected]>
Date: Thu, 14 Feb 2008 20:55:40 +0900
Quoted 4 lines
This patch fix a BUG when adding spds which have
same selector.Signed-off-by Kazunori MIYAZAWA <[email protected]>
Applied, thanks!