Skip to contentSkip to conversation

net: arcnet: Do not call kfree_skb() under local_irq_disable()

PATCH Applied Jinjie Ruan 2 participants 2 messages Aug 24, 2023 – Aug 25, 2023

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net: arcnet: Do not call kfree_skb() under local_irq_disable()

It is not allowed to call kfree_skb() from hardware interrupt context or with hardware interrupts being disabled. So replace kfree_skb() with dev_kfree_skb_irq() under local_irq_disable(). Compile tested only.

Fixes 05fcd31cc472 ("arcnet: add err_skb package for package status feedback")
---
 drivers/net/arcnet/arcnet.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/arcnet/arcnet.c +1 -1
index 99265667538c..d9e052c49ba1 100644
@@ -464,7 +464,7 @@ static void arcnet_reply_tasklet(struct tasklet_struct *t)
 
 	ret = sock_queue_err_skb(sk, ackskb);
 	if (ret)
-		kfree_skb(ackskb);
+		dev_kfree_skb_irq(ackskb);
 
 	local_irq_enable();
 };
Signature · 1 line
2.34.1
#1 lore raw
This patch was applied to netdev/net.git (main) by David S. Miller <[email protected]>:

Hello:

This patch was applied to netdev/net.git (main)
by David S. Miller <[email protected]>:

Quoted 9 lines · On Thu, 24 Aug 2023 14:43:36 +0800 you wrote:

It is not allowed to call kfree_skb() from hardware interrupt context or with hardware interrupts being disabled. So replace kfree_skb() with dev_kfree_skb_irq() under local_irq_disable(). Compile tested only.

Fixes 05fcd31cc472 ("arcnet: add err_skb package for package status feedback")

[...]

Here is the summary with links:
- net: arcnet: Do not call kfree_skb() under local_irq_disable()

    https://git.kernel.org/netdev/net/c/786c96e92fb9

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html