net: stmmac: use correct DMA buffer size in the RX descriptor
[ Upstream commit 583e6361 ] We always program the maximum DMA buffer size into the receive descriptor, although the allocated size may be less. E.g. with the default MTU size we allocate only 1536 bytes. If somebody sends us a bigger frame, then memory may get corrupted. Fix by using exact buffer sizes. Signed-off-by:Aaro Koskinen <aaro.koskinen@nokia.com> Signed-off-by:
David S. Miller <davem@davemloft.net> Signed-off-by:
Sasha Levin <sashal@kernel.org>
Showing
Please register or sign in to comment