net: fec: fix improper use of NETDEV_TX_BUSY
stable inclusion from stable-v5.10.154 commit c85ee1c3cbc6b3e6e0a10918e49c2266b18089eb category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I64YCB Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=c85ee1c3cbc6b3e6e0a10918e49c2266b18089eb -------------------------------- [ Upstream commit 06a4df58 ] The ndo_start_xmit() method must not free skb when returning NETDEV_TX_BUSY, since caller is going to requeue freed skb. Fix it by returning NETDEV_TX_OK in case of dma_map_single() fails. Fixes: 79f33912 ("net: fec: Add software TSO support") Signed-off-by:Zhang Changzhong <zhangchangzhong@huawei.com> Signed-off-by:
David S. Miller <davem@davemloft.net> Signed-off-by:
Sasha Levin <sashal@kernel.org> Signed-off-by:
Lipeng Sang <sanglipeng1@jd.com> (cherry picked from commit a989dc3b)
Loading
Please sign in to comment