* [IPSEC]: Fix double free on skb on async output
@ 2007-12-30 12:36 Herbert Xu
2007-12-31 5:10 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Herbert Xu @ 2007-12-30 12:36 UTC (permalink / raw)
To: David S. Miller, netdev
Hi Dave:
Here's a fix for a silly bug on the async output path for IPsec.
[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 <herbert@gondor.apana.org.au>
diff --git a/net/xfrm/xfrm_output.c b/net/xfrm/xfrm_output.c
index c1ba63e..81ad8eb 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) {
Thanks,
--
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-12-31 5:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-12-30 12:36 [IPSEC]: Fix double free on skb on async output Herbert Xu
2007-12-31 5:10 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox