[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20100322172446.GA32758@oksana.dev.rtsoft.ru>
Date: Mon, 22 Mar 2010 20:24:46 +0300
From: Anton Vorontsov <avorontsov@...mvista.com>
To: David Miller <davem@...emloft.net>
Cc: ben@...footnetworks.com, netdev@...r.kernel.org,
Sandeep.Kumar@...escale.com
Subject: Re: Gianfar: RX Recycle skb->len error
On Sun, Mar 21, 2010 at 09:46:42PM -0700, David Miller wrote:
[...]
> > * recycle list.
> > */
> > skb->data = skb->head + NET_SKB_PAD;
> > + skb_reset_tail_pointer(skb);
> > __skb_queue_head(&priv->rx_recycle, skb);
> > }
> > } else {
>
> This code is essentially trying to undo skb_reserve()
> but as you found it's doing so in a buggy manner.
>
> skb_reserve() adjusts both the 'data' and 'tail' pointers,
> but this attempt at a reversal is only modifying 'data'.
>
> Your fix is fine, but really any by-hand modification of
> skb->data is a bug, and we should provide an skb_unreserve()
> or similar to hide such details away, and use it here.
>
> Anton?
Yes, skb_unreserve() (or skb_reset_reserved() for naming consistency?)
would be great.
Ben, note that ucc_geth.c driver is also affected by that bug,
so I guess it needs a similar fix.
Thanks,
--
Anton Vorontsov
email: cbouatmailru@...il.com
irc://irc.freenode.net/bd2
--
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