Skip to contentSkip to conversation

net: make sure net_rx_action() calls skb_defer_free_flush()

PATCH Applied Eric Dumazet 3 participants 3 messages Apr 27, 2022 – Apr 28, 2022

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

PATCH 1/1 net: make sure net_rx_action() calls skb_defer_free_flush()

From: Eric Dumazet <[email protected]>

I missed a stray return; in net_rx_action(), which very well is taken whenever trigger_rx_softirq() has been called on a cpu that is no longer receiving network packets, or receiving too few of them.

Fixes 68822bdf76f1 ("net: generalize skb freeing deferral to per-cpu lists")
---
 net/core/dev.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
net/core/dev.c +2 -1
index 611bd719706412723561c27753150b27e1dc4e7a..e09cd202fc579dfe2313243e20def8044aafafa2 100644
@@ -6617,7 +6617,7 @@ static __latent_entropy void net_rx_action(struct softirq_action *h)
 
 		if (list_empty(&list)) {
 			if (!sd_has_rps_ipi_waiting(sd) && list_empty(&repoll))
-				return;
+				goto end;
 			break;
 		}
 
@@ -6644,6 +6644,7 @@ static __latent_entropy void net_rx_action(struct softirq_action *h)
 		__raise_softirq_irqoff(NET_RX_SOFTIRQ);
 
 	net_rps_action_and_irq_enable(sd);
+end:
 	skb_defer_free_flush(sd);
 }
 
Signature · 1 line
2.36.0.rc2.479.g8af0fa9b8e-goog
Tested-by on v1 1/1
#1 lore raw
Quoted 10 lines · Eric Dumazet

From: Eric Dumazet <[email protected]>

I missed a stray return; in net_rx_action(), which very well is taken whenever trigger_rx_softirq() has been called on a cpu that is no longer receiving network packets, or receiving too few of them.

Fixes 68822bdf76f1 ("net: generalize skb freeing deferral to per-cpu lists")

Thanks!

#2 lore raw
In reply to Eric Dumazet
This patch was applied to netdev/net-next.git (master) by Paolo Abeni <[email protected]>:

Hello:

This patch was applied to netdev/net-next.git (master) by Paolo Abeni <[email protected]>:

Quoted 8 lines · On Wed, 27 Apr 2022 13:41:47 -0700 you wrote:

From: Eric Dumazet <[email protected]>

I missed a stray return; in net_rx_action(), which very well is taken whenever trigger_rx_softirq() has been called on a cpu that is no longer receiving network packets, or receiving too few of them.

[...]

Here is the summary with links:
- [net-next] net: make sure net_rx_action() calls skb_defer_free_flush()

    https://git.kernel.org/netdev/net-next/c/f3412b3879b4

You are awesome, thank you!

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