From: Herbert Xu Date: Mon, 31 Dec 2007 05:09:38 +0000 (-0800) Subject: [IPSEC]: Fix double free on skb on async output X-Git-Tag: MMI-PSA29.97-13-9~37648^2~913 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=fcb8c156c8277ee9d71c8c81587d494c9c5240b3;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git [IPSEC]: Fix double free on skb on async output When the output transform returns EINPROGRESS due to async operation we'll free the skb the straight away as if it were an error. This patch fixes that so that the skb is freed when the async operation completes. Signed-off-by: Herbert Xu Signed-off-by: David S. Miller --- diff --git a/net/xfrm/xfrm_output.c b/net/xfrm/xfrm_output.c index c1ba63efd7cb..81ad8eb2b283 100644 --- a/net/xfrm/xfrm_output.c +++ b/net/xfrm/xfrm_output.c @@ -78,6 +78,8 @@ static int xfrm_output_one(struct sk_buff *skb, int err) spin_unlock_bh(&x->lock); err = x->type->output(x, skb); + if (err == -EINPROGRESS) + goto out_exit; resume: if (err) {