netdev
[Top] [All Lists]

Re: [1/1] xfrm: skb_cow_data() does not set proper owner for new skbs.

To: johnpol@xxxxxxxxxxx (Evgeniy Polyakov)
Subject: Re: [1/1] xfrm: skb_cow_data() does not set proper owner for new skbs.
From: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Date: Sun, 15 May 2005 18:01:09 +1000
Cc: netdev@xxxxxxxxxxx, davem@xxxxxxxxxxxxx
In-reply-to: <20050514134834.GA2698@xxxxxxxxxxxxxxxxxxxxxxxx>
Organization: Core
Sender: netdev-bounce@xxxxxxxxxxx
User-agent: tin/1.7.4-20040225 ("Benbecula") (UNIX) (Linux/2.4.27-hx-1-686-smp (i686))
Evgeniy Polyakov <johnpol@xxxxxxxxxxx> wrote:
>
> As far as I can see, current code sets destructor and socket
> for the first one skb only and uses truesize of the first skb
> only to increment sk_wmem_alloc value.
> 
> If above "analysis" is correct then attached patch fixes that.

Yes you're absolutely right.

> Signed-off-by: Evgeniy Polyakov <johnpol@xxxxxxxxxxx>

Acked-by: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>

In fact you've uncovered a couple of bugs elsewhere too.  IPv4's
ip_push_pending_frames attributes all the data to the first skb
which breaks when the packet is sent through ip_fragment since
the latter does not undo the truesize attribution.  skb_linearize
is broken as well since it ignores truesize/owner altogether.

Cheers,
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

<Prev in Thread] Current Thread [Next in Thread>