]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
dpaa2-eth: recycle the RX buffer only after all processing done
authorIoana Ciornei <ioana.ciornei@nxp.com>
Fri, 24 Nov 2023 10:28:05 +0000 (12:28 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 10 Jan 2024 16:10:32 +0000 (17:10 +0100)
commite570b15087532919688979b6ead02bb5b890b082
tree031a9a1455db55902804754f552f3315cc84ab48
parent5b8938fc7d00ad4a89251a1cef96d9f0437540b0
dpaa2-eth: recycle the RX buffer only after all processing done

[ Upstream commit beb1930f966d1517921488bd5d64147f58f79abf ]

The blamed commit added support for Rx copybreak. This meant that for
certain frame sizes, a new skb was allocated and the initial data buffer
was recycled. Instead of waiting to recycle the Rx buffer only after all
processing was done on it (like accessing the parse results or timestamp
information), the code path just went ahead and re-used the buffer right
away.

This sometimes lead to corrupted HW and SW annotation areas.
Fix this by delaying the moment when the buffer is recycled.

Fixes: 50f826999a80 ("dpaa2-eth: add rx copybreak support")
Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c