[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <95DC1AA8EC908B48939B72CF375AA5E3013A991400@alice.at.omicron.at>
Date: Mon, 9 Jan 2012 11:43:10 +0100
From: Manfred Rudigier <manfred.rudigier@...cron.at>
To: Eric Dumazet <eric.dumazet@...il.com>
CC: David Miller <davem@...emloft.net>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"afleming@...escale.com" <afleming@...escale.com>,
"avorontsov@...sta.com" <avorontsov@...sta.com>
Subject: RE: [PATCH] gianfar: Fix invalid TX frames returned on error queue
when time stamping.
From: Eric Dumazet [mailto:eric.dumazet@...il.com]
Sent: Monday, January 09, 2012 10:59
>Le lundi 09 janvier 2012 à 10:36 +0100, Manfred Rudigier a écrit :
>
>> I have tried your suggested steal sequence, but it crashed.
>> I see that there is also a destructor - when I use the skb_orphan function
>(which calls the destructor) like this it works:
>>
>> skb_new->sk = skb->sk;
>> skb_orphan(skb);
>> kfree_skb(skb);
>>
>> Is this the correct solution?
>
>I dont think so.
>
>destructor and sk are coupled, you cant steal one and let the other
>untouched.
If I understand you correctly, we must also steal the destructor like this:
skb_new->sk = skb->sk;
skb_new->destructor = skb->destructor;
skb->sk = NULL;
skb->destructor = NULL;
kfree_skb(skb);
Then the destructor will be called at the end of the skb_tstamp_tx function, which should be fine, right?
Powered by blists - more mailing lists