Re: [PATCH stable v4.14 1/2] net: stmmac: use correct DMA buffer size in the RX descriptor

From: Greg KH
Date: Thu Dec 19 2019 - 10:41:47 EST


On Wed, Dec 18, 2019 at 05:17:19AM -0800, Aviraj CJ wrote:
> upstream 583e6361414903c5206258a30e5bd88cb03c0254 commit
>
> 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.
>
> Program DMA using exact buffer sizes.
>
> Signed-off-by: Aaro Koskinen <aaro.koskinen@xxxxxxxxx>
> Signed-off-by: David S. Miller <davem@xxxxxxxxxxxxx>
> Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>
> [acj: backport v4.14 -stable
> - adjust context
> - skipped the section modifying non-existent functions in dwxgmac2_descs.c and
> hwif.h ]
> Signed-off-by: Aviraj CJ <acj@xxxxxxxxx>

Thanks for all of the backports, all now queued up.

greg k-h