public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH net] net: lantiq_etop: don't free skb when returning NETDEV_TX_BUSY
@ 2022-10-21  1:32 Zhang Changzhong
  2022-10-24 12:10 ` patchwork-bot+netdevbpf
  0 siblings, 1 reply; 2+ messages in thread
From: Zhang Changzhong @ 2022-10-21  1:32 UTC (permalink / raw)
  To: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	John Crispin, Ralph Hempel, Ralf Baechle
  Cc: Zhang Changzhong, netdev, linux-kernel

The ndo_start_xmit() method must not free skb when returning
NETDEV_TX_BUSY, since caller is going to requeue freed skb.

Fixes: 504d4721ee8e ("MIPS: Lantiq: Add ethernet driver")
Signed-off-by: Zhang Changzhong <zhangchangzhong@huawei.com>
---
 drivers/net/ethernet/lantiq_etop.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/net/ethernet/lantiq_etop.c b/drivers/net/ethernet/lantiq_etop.c
index 59aab40..f5961bd 100644
--- a/drivers/net/ethernet/lantiq_etop.c
+++ b/drivers/net/ethernet/lantiq_etop.c
@@ -485,7 +485,6 @@ ltq_etop_tx(struct sk_buff *skb, struct net_device *dev)
 	len = skb->len < ETH_ZLEN ? ETH_ZLEN : skb->len;
 
 	if ((desc->ctl & (LTQ_DMA_OWN | LTQ_DMA_C)) || ch->skb[ch->dma.desc]) {
-		dev_kfree_skb_any(skb);
 		netdev_err(dev, "tx ring full\n");
 		netif_tx_stop_queue(txq);
 		return NETDEV_TX_BUSY;
-- 
2.9.5


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH net] net: lantiq_etop: don't free skb when returning NETDEV_TX_BUSY
  2022-10-21  1:32 [PATCH net] net: lantiq_etop: don't free skb when returning NETDEV_TX_BUSY Zhang Changzhong
@ 2022-10-24 12:10 ` patchwork-bot+netdevbpf
  0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-10-24 12:10 UTC (permalink / raw)
  To: Zhang Changzhong
  Cc: davem, edumazet, kuba, pabeni, blogic, ralph.hempel, ralf, netdev,
	linux-kernel

Hello:

This patch was applied to netdev/net.git (master)
by David S. Miller <davem@davemloft.net>:

On Fri, 21 Oct 2022 09:32:24 +0800 you wrote:
> The ndo_start_xmit() method must not free skb when returning
> NETDEV_TX_BUSY, since caller is going to requeue freed skb.
> 
> Fixes: 504d4721ee8e ("MIPS: Lantiq: Add ethernet driver")
> Signed-off-by: Zhang Changzhong <zhangchangzhong@huawei.com>
> ---
>  drivers/net/ethernet/lantiq_etop.c | 1 -
>  1 file changed, 1 deletion(-)

Here is the summary with links:
  - [net] net: lantiq_etop: don't free skb when returning NETDEV_TX_BUSY
    https://git.kernel.org/netdev/net/c/9c1eaa27ec59

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-10-24 20:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-10-21  1:32 [PATCH net] net: lantiq_etop: don't free skb when returning NETDEV_TX_BUSY Zhang Changzhong
2022-10-24 12:10 ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox