]> err.no Git - linux-2.6/commitdiff
[IPSEC]: Fix double free on skb on async output
authorHerbert Xu <herbert@gondor.apana.org.au>
Mon, 31 Dec 2007 05:09:38 +0000 (21:09 -0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 28 Jan 2008 23:00:09 +0000 (15:00 -0800)
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/xfrm/xfrm_output.c

index c1ba63efd7cbcf3a786050b2c9bc01ff818690ea..81ad8eb2b283d1e8006af5cb435dc9726a94182c 100644 (file)
@@ -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) {