Re: Regression, bisected: reference leak with IPSec since ~2.6.31

From: Nick Bowler
Date: Tue Sep 21 2010 - 10:06:01 EST


On 2010-09-20 23:31 +0200, Eric Dumazet wrote:
> Could you try following patch ?
>
> [PATCH] ip : fix truesize mismatch in ip fragmentation
[...]
> @@ -658,13 +657,15 @@ static int ip6_fragment(struct sk_buff *skb, int (*output)(struct sk_buff *))
> goto slow_path;
>
> BUG_ON(frag->sk);
> - if (skb->sk) {
> + }
> + if (skb->sk) {
> + skb_walk_frags(skb, frag) {
> frag->sk = skb->sk;
> frag->destructor = sock_wfree;
> - truesizes += frag->truesize;
> + skb->truesize -= frag->truesize;
> }
> }
> -
> +

This hunk introduces some whitespace damage.

Anyway, I tried this with ESP on both IPv4 and IPv6 and it appears to
correct the issue. Thanks!

--
Nick Bowler, Elliptic Technologies (http://www.elliptictech.com/)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/