[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20081216.152815.55433113.davem@davemloft.net>
Date: Tue, 16 Dec 2008 15:28:15 -0800 (PST)
From: David Miller <davem@...emloft.net>
To: afleming@...escale.com
Cc: jeff@...zik.org, galak@...nel.crashing.org, netdev@...r.kernel.org
Subject: Re: [PATCH v2.6.29 02/14] gianfar: Fix skb allocation error
From: Andy Fleming <afleming@...escale.com>
Date: Tue, 16 Dec 2008 17:20:55 -0600
> We don't want to unmap the skb if we've decided to use the old one, so we only
> unmap it if we're *not* using the old one.
>
> Signed-off-by: Andy Fleming <afleming@...escale.com>
This does not apply to net-next-2.6, the code in this area doesn't
look anything like the context in this patch. What are you
generating this against?
> @@ -1659,8 +1659,7 @@ int gfar_clean_rx_ring(struct net_device *dev, int rx_work_limit)
>
> if (unlikely(!newskb))
> newskb = skb;
> -
> - if (skb) {
> + else if (skb) {
> dma_unmap_single(&priv->dev->dev,
> bdp->bufPtr,
> priv->rx_buffer_size,
That code reads:
if (unlikely(!newskb))
newskb = skb;
if (skb)
dev_kfree_skb_any(skb);
in my tree and the dma_unmap_single() is unconditionally executed
further up before the:
/* We drop the frame if we failed to allocate a new buffer */
if (unlikely(!newskb || !(bdp->status & RXBD_LAST) ||
bdp->status & RXBD_ERR)) {
check.
Please sort this out and be more careful in the future.
Thanks.
--
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