From: Richard Cochran <richardcochran@gmail.com>
To: Manfred Rudigier <manfred.rudigier@omicron.at>
Cc: Eric Dumazet <eric.dumazet@gmail.com>,
David Miller <davem@davemloft.net>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"afleming@freescale.com" <afleming@freescale.com>,
"avorontsov@mvista.com" <avorontsov@mvista.com>
Subject: Re: [PATCH] gianfar: Fix invalid TX frames returned on error queue when time stamping.
Date: Mon, 9 Jan 2012 13:41:08 +0100 [thread overview]
Message-ID: <20120109124108.GA4404@cherladcori01> (raw)
In-Reply-To: <95DC1AA8EC908B48939B72CF375AA5E3013A99137D@alice.at.omicron.at>
On Mon, Jan 09, 2012 at 10:36:44AM +0100, Manfred Rudigier wrote:
> From: Eric Dumazet [mailto:eric.dumazet@gmail.com]
> Sent: Monday, January 09, 2012 08:44
>
> >Le lundi 09 janvier 2012 à 08:16 +0100, Manfred Rudigier a écrit :
> >> From: David Miller [mailto:davem@davemloft.net]
> >> Sent: Thursday, January 05, 2012 19:27
> >>
> >> >From: Manfred Rudigier <manfred.rudigier@omicron.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?
> >
> >I really wonder how your code was possibly working...
>
> Well, it was working :-)
It was only working because the conditional was always false:
if (((skb->ip_summed == CHECKSUM_PARTIAL) ||
vlan_tx_tag_present(skb) ||
unlikely(do_tstamp)) &&
(skb_headroom(skb) < GMAC_FCB_LEN)) {
struct sk_buff *skb_new;
...
}
IOW, there was always at least GMAC_FCB_LEN bytes in skb_headroom.
Richard
next prev parent reply other threads:[~2012-01-09 12:41 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-05 14:50 [PATCH] gianfar: Fix invalid TX frames returned on error queue when time stamping Manfred Rudigier
2012-01-05 18:26 ` David Miller
2012-01-09 7:16 ` Manfred Rudigier
2012-01-09 7:43 ` Eric Dumazet
2012-01-09 9:36 ` Manfred Rudigier
2012-01-09 9:58 ` Eric Dumazet
2012-01-09 10:43 ` Manfred Rudigier
2012-01-09 12:41 ` Richard Cochran [this message]
2012-01-09 12:50 ` Richard Cochran
2012-01-09 12:49 ` Richard Cochran
2012-01-09 14:45 ` Manfred Rudigier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120109124108.GA4404@cherladcori01 \
--to=richardcochran@gmail.com \
--cc=afleming@freescale.com \
--cc=avorontsov@mvista.com \
--cc=davem@davemloft.net \
--cc=eric.dumazet@gmail.com \
--cc=manfred.rudigier@omicron.at \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox