Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
net: mvneta: fix error path for building skb
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: Marcin Wojtas <[email protected]> Acked-by: Simon Guinot <[email protected]> Cc: <[email protected]> # v4.2+ Fixes a84e328 ("net: mvneta: fix refilling for Rx DMA buffers") Signed-off-by: David S. Miller <[email protected]>
- Loading branch information