[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20120109124908.GB4404@cherladcori01>
Date: Mon, 9 Jan 2012 13:49:08 +0100
From: Richard Cochran <richardcochran@...il.com>
To: Manfred Rudigier <manfred.rudigier@...cron.at>
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.
On Mon, Jan 09, 2012 at 08:16:01AM +0100, Manfred Rudigier wrote:
> From: David Miller [mailto:davem@...emloft.net]
> Sent: Thursday, January 05, 2012 19:27
>
> >From: Manfred Rudigier <manfred.rudigier@...cron.at>
> >Date: Thu, 5 Jan 2012 15:50:21 +0100
> >
> >> +
> >> + /* Keep sock if we must return a time stamp on the err queue */
> >> + skb_new->sk = skb->sk;
> >
> >When I see something like this without any kind of reference counting or
> >similar, I am gravely concerned.
>
> The skb_tstamp_tx function called during gfar_clean_tx_ring requires
> the skb->sk pointer to be set. Otherwise no time stamp can be queued
> on the socket error queue.
> What would be the correct way for doing this?
Hi Manfred,
You have to make sure the new clone holds a reference on skb->sk.
A recent, similar problem was discussed:
http://comments.gmane.org/gmane.linux.network/208143
And the solution came in:
commit da92b194cc36b5dc1fbd85206aeeffd80bee0c39
Author: Richard Cochran <richardcochran@...il.com>
Date: Fri Oct 21 00:49:15 2011 +0000
net: hold sock reference while processing tx timestamps
HTH,
Richard
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists