[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <BLU0-SMTP200803D333FF3A2F15AB82DAC090@phx.gbl>
Date: Tue, 29 Oct 2013 01:22:55 -0700
From: Nathan Hintz <nlhintz@...mail.com>
To: Rafał Miłecki <zajec5@...il.com>
CC: Network Development <netdev@...r.kernel.org>
Subject: Re: [PATCH] bgmac: don't update slot on skb alloc/dma mapping error
On Tue, 29 Oct 2013 07:52:58 +0100
Rafał Miłecki <zajec5@...il.com> wrote:
> 2013/10/29 Nathan Hintz <nlhintz@...mail.com>:
> > Don't update the slot in "bgmac_dma_rx_skb_for_slot" unless both the
> > skb alloc and dma mapping are successful; and free the newly allocated
> > skb if a dma mapping error occurs. This will prevent an skb leak upon
> > returning when an error occurs.
>
> In case of bgmac_dma_rx_skb_for_slot failure we're giving up anyway
> (and freeing everything), but with your patch code is simpler to
> understand, so I'm OK with that.
>
> Acked-by: Rafał Miłecki <zajec5@...il.com>
>
I might be misunderstanding; but it in the case of failure, it appeared to me
that the currently received packet was dropped and the old skb would continue
to be assigned to the slot and would be used to receive future packets (this
would continue until bgmac_dma_rx_skb_for_slot was successful).
--
Nathan
--
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