From: Kazunori MIYAZAWA Date: Thu, 14 Feb 2008 22:51:38 +0000 (-0800) Subject: [AF_KEY]: Fix bug in spdadd X-Git-Tag: firefly_0821_release~22269^2~67 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=a4d6b8af1e92daa872f55d06415b76c35f44d8bd;p=firefly-linux-kernel-4.4.55.git [AF_KEY]: Fix bug in spdadd This patch fix a BUG when adding spds which have same selector. Signed-off-by: Kazunori MIYAZAWA Signed-off-by: David S. Miller --- diff --git a/net/key/af_key.c b/net/key/af_key.c index b3ac85e808ac..1c853927810a 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; }