提交 bf66f278 编写于 作者: V Vincent Stehlé 提交者: Xie XiuQi

net: korina: fix return value

stable inclusion
from stable-5.10.4
commit 027112b2671b2bd5a64b0bd9299aecc6b9982134
bugzilla: 46903

--------------------------------

[ Upstream commit 7eb000bd ]

The ndo_start_xmit() method must not attempt to free the skb to transmit
when returning NETDEV_TX_BUSY. Therefore, make sure the
korina_send_packet() function returns NETDEV_TX_OK when it frees a packet.

Fixes: ef11291b ("Add support the Korina (IDT RC32434) Ethernet MAC")
Suggested-by: NJakub Kicinski <kuba@kernel.org>
Signed-off-by: NVincent Stehlé <vincent.stehle@laposte.net>
Acked-by: NFlorian Fainelli <f.fainelli@gmail.com>
Link: https://lore.kernel.org/r/20201214220952.19935-1-vincent.stehle@laposte.netSigned-off-by: NJakub Kicinski <kuba@kernel.org>
Signed-off-by: NSasha Levin <sashal@kernel.org>
Signed-off-by: NChen Jun <chenjun102@huawei.com>
Acked-by: NXie XiuQi <xiexiuqi@huawei.com>
上级 605898ca
......@@ -219,7 +219,7 @@ static int korina_send_packet(struct sk_buff *skb, struct net_device *dev)
dev_kfree_skb_any(skb);
spin_unlock_irqrestore(&lp->lock, flags);
return NETDEV_TX_BUSY;
return NETDEV_TX_OK;
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册