* [PATCH][KEY] fix bug in spdadd
@ 2008-02-14 11:55 Kazunori MIYAZAWA
2008-02-14 14:54 ` YOSHIFUJI Hideaki / 吉藤英明
2008-02-14 22:51 ` David Miller
0 siblings, 2 replies; 4+ messages in thread
From: Kazunori MIYAZAWA @ 2008-02-14 11:55 UTC (permalink / raw)
To: David S. Miller, netdev
[-- Attachment #1: Type: text/plain, Size: 146 bytes --]
This patch fix a BUG when adding spds which have
same selector.
Signed-off-by: Kazunori MIYAZAWA <kazunori@miyazawa.org>
--
Kazunori Miyazawa
[-- Attachment #2: af_key.diff --]
[-- Type: text/x-patch, Size: 308 bytes --]
diff --git a/net/key/af_key.c b/net/key/af_key.c
index b3ac85e..1c85392 100644
--- a/net/key/af_key.c
+++ b/net/key/af_key.c
@@ -2291,6 +2291,7 @@ static int pfkey_spdadd(struct sock *sk, struct sk_buff *skb, struct sadb_msg *h
return 0;
out:
+ xp->dead = 1;
xfrm_policy_destroy(xp);
return err;
}
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH][KEY] fix bug in spdadd
2008-02-14 11:55 [PATCH][KEY] fix bug in spdadd Kazunori MIYAZAWA
@ 2008-02-14 14:54 ` YOSHIFUJI Hideaki / 吉藤英明
2008-02-14 22:53 ` David Miller
2008-02-14 22:51 ` David Miller
1 sibling, 1 reply; 4+ messages in thread
From: YOSHIFUJI Hideaki / 吉藤英明 @ 2008-02-14 14:54 UTC (permalink / raw)
To: kazunori, davem; +Cc: netdev
In article <47B42C3C.5090104@miyazawa.org> (at Thu, 14 Feb 2008 20:55:40 +0900), Kazunori MIYAZAWA <kazunori@miyazawa.org> says:
> This patch fix a BUG when adding spds which have
> same selector.
>
> Signed-off-by: Kazunori MIYAZAWA <kazunori@miyazawa.org>
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.
---
diff --git a/net/xfrm/xfrm_user.c b/net/xfrm/xfrm_user.c
index 7833807..f971ca5 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;
}
--
YOSHIFUJI Hideaki @ USAGI Project <yoshfuji@linux-ipv6.org>
GPG-FP : 9022 65EB 1ECF 3AD1 0BDF 80D8 4807 F894 E062 0EEA
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH][KEY] fix bug in spdadd
2008-02-14 11:55 [PATCH][KEY] fix bug in spdadd Kazunori MIYAZAWA
2008-02-14 14:54 ` YOSHIFUJI Hideaki / 吉藤英明
@ 2008-02-14 22:51 ` David Miller
1 sibling, 0 replies; 4+ messages in thread
From: David Miller @ 2008-02-14 22:51 UTC (permalink / raw)
To: kazunori; +Cc: netdev
From: Kazunori MIYAZAWA <kazunori@miyazawa.org>
Date: Thu, 14 Feb 2008 20:55:40 +0900
> This patch fix a BUG when adding spds which have
> same selector.
>
> Signed-off-by: Kazunori MIYAZAWA <kazunori@miyazawa.org>
Applied, thanks!
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-02-14 22:52 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-14 11:55 [PATCH][KEY] fix bug in spdadd Kazunori MIYAZAWA
2008-02-14 14:54 ` YOSHIFUJI Hideaki / 吉藤英明
2008-02-14 22:53 ` David Miller
2008-02-14 22:51 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).