Skip to content
Commit ed42098a authored by Marcin Wojtas's avatar Marcin Wojtas Committed by Greg Kroah-Hartman
Browse files

net: mvneta: fix error path for building skb

commit 26c17a17

 upstream.

In the actual RX processing, there is same error path for both descriptor
ring refilling and building skb fails. This is not correct, because after
successful refill, the ring is already updated with newly allocated
buffer. Then, in case of build_skb() fail, hitherto code left the original
buffer unmapped.

This patch fixes above situation by swapping error check of skb build with
DMA-unmap of original buffer.

Signed-off-by: default avatarMarcin Wojtas <mw@semihalf.com>
Acked-by: default avatarSimon Guinot <simon.guinot@sequanux.org>
Fixes a84e3289

 ("net: mvneta: fix refilling for Rx DMA buffers")
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent bf14478a
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment