]> git.baikalelectronics.ru Git - kernel.git/commit
net: ethernet: mtk-star-emac: fix wrong unmap in RX handling
authorBiao Huang <biao.huang@mediatek.com>
Tue, 2 Mar 2021 03:33:23 +0000 (11:33 +0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 2 Mar 2021 23:28:07 +0000 (15:28 -0800)
commit69888b4fb26cba5ca1915f6e41fde560a34a87d8
tree59b213d1b4fdafa3426ed56e1fcfe12aeab58656
parente7dad7f81b29e911e145c7d66fabbe8422a28d74
net: ethernet: mtk-star-emac: fix wrong unmap in RX handling

mtk_star_dma_unmap_rx() should unmap the dma_addr of old skb rather than
that of new skb.
Assign new_dma_addr to desc_data.dma_addr after all handling of old skb
ends to avoid unexpected receive side error.

Fixes: ef58246290a2 ("net: ethernet: mtk-star-emac: fix error path in RX handling")
Signed-off-by: Biao Huang <biao.huang@mediatek.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mediatek/mtk_star_emac.c