* [PATCH net] net: macb: Use dev_consume_skb_any() to free TX SKBs
@ 2026-03-21 14:04 Kevin Hao
2026-03-23 16:43 ` Simon Horman
2026-03-24 12:30 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 3+ messages in thread
From: Kevin Hao @ 2026-03-21 14:04 UTC (permalink / raw)
To: Nicolas Ferre, Claudiu Beznea, Andrew Lunn, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, Sean Anderson
Cc: netdev, Kevin Hao, stable
The napi_consume_skb() function is not intended to be called in an IRQ
disabled context. However, after commit 6bc8a5098bf4 ("net: macb: Fix
tx_ptr_lock locking"), the freeing of TX SKBs is performed with IRQs
disabled. To resolve the following call trace, use dev_consume_skb_any()
for freeing TX SKBs:
WARNING: kernel/softirq.c:430 at __local_bh_enable_ip+0x174/0x188, CPU#0: ksoftirqd/0/15
Modules linked in:
CPU: 0 UID: 0 PID: 15 Comm: ksoftirqd/0 Not tainted 7.0.0-rc4-next-20260319-yocto-standard-dirty #37 PREEMPT
Hardware name: ZynqMP ZCU102 Rev1.1 (DT)
pstate: 200000c5 (nzCv daIF -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
pc : __local_bh_enable_ip+0x174/0x188
lr : local_bh_enable+0x24/0x38
sp : ffff800082b3bb10
x29: ffff800082b3bb10 x28: ffff0008031f3c00 x27: 000000000011ede0
x26: ffff000800a7ff00 x25: ffff800083937ce8 x24: 0000000000017a80
x23: ffff000803243a78 x22: 0000000000000040 x21: 0000000000000000
x20: ffff000800394c80 x19: 0000000000000200 x18: 0000000000000001
x17: 0000000000000001 x16: ffff000803240000 x15: 0000000000000000
x14: ffffffffffffffff x13: 0000000000000028 x12: ffff000800395650
x11: ffff8000821d1528 x10: ffff800081c2bc08 x9 : ffff800081c1e258
x8 : 0000000100000301 x7 : ffff8000810426ec x6 : 0000000000000000
x5 : 0000000000000001 x4 : 0000000000000001 x3 : 0000000000000000
x2 : 0000000000000008 x1 : 0000000000000200 x0 : ffff8000810428dc
Call trace:
__local_bh_enable_ip+0x174/0x188 (P)
local_bh_enable+0x24/0x38
skb_attempt_defer_free+0x190/0x1d8
napi_consume_skb+0x58/0x108
macb_tx_poll+0x1a4/0x558
__napi_poll+0x50/0x198
net_rx_action+0x1f4/0x3d8
handle_softirqs+0x16c/0x560
run_ksoftirqd+0x44/0x80
smpboot_thread_fn+0x1d8/0x338
kthread+0x120/0x150
ret_from_fork+0x10/0x20
irq event stamp: 29751
hardirqs last enabled at (29750): [<ffff8000813be184>] _raw_spin_unlock_irqrestore+0x44/0x88
hardirqs last disabled at (29751): [<ffff8000813bdf60>] _raw_spin_lock_irqsave+0x38/0x98
softirqs last enabled at (29150): [<ffff8000800f1aec>] handle_softirqs+0x504/0x560
softirqs last disabled at (29153): [<ffff8000800f2fec>] run_ksoftirqd+0x44/0x80
Fixes: 6bc8a5098bf4 ("net: macb: Fix tx_ptr_lock locking")
Signed-off-by: Kevin Hao <haokexin@gmail.com>
Cc: stable@vger.kernel.org
---
drivers/net/ethernet/cadence/macb_main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/cadence/macb_main.c b/drivers/net/ethernet/cadence/macb_main.c
index 1cb49252abf5ad553c6213d4f813abade9c20615..46f2847a3731ff3742c9aac09791a71a8eecd9f0 100644
--- a/drivers/net/ethernet/cadence/macb_main.c
+++ b/drivers/net/ethernet/cadence/macb_main.c
@@ -1210,7 +1210,7 @@ static void macb_tx_unmap(struct macb *bp, struct macb_tx_skb *tx_skb, int budge
}
if (tx_skb->skb) {
- napi_consume_skb(tx_skb->skb, budget);
+ dev_consume_skb_any(tx_skb->skb);
tx_skb->skb = NULL;
}
}
---
base-commit: 785f0eb2f85decbe7c1ef9ae922931f0194ffc2e
change-id: 20260321-macb-tx-4cc36e13e4e8
Best regards,
--
Kevin Hao <haokexin@gmail.com>
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH net] net: macb: Use dev_consume_skb_any() to free TX SKBs
2026-03-21 14:04 [PATCH net] net: macb: Use dev_consume_skb_any() to free TX SKBs Kevin Hao
@ 2026-03-23 16:43 ` Simon Horman
2026-03-24 12:30 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: Simon Horman @ 2026-03-23 16:43 UTC (permalink / raw)
To: Kevin Hao
Cc: Nicolas Ferre, Claudiu Beznea, Andrew Lunn, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, Sean Anderson, netdev,
stable
On Sat, Mar 21, 2026 at 10:04:41PM +0800, Kevin Hao wrote:
> The napi_consume_skb() function is not intended to be called in an IRQ
> disabled context. However, after commit 6bc8a5098bf4 ("net: macb: Fix
> tx_ptr_lock locking"), the freeing of TX SKBs is performed with IRQs
> disabled. To resolve the following call trace, use dev_consume_skb_any()
> for freeing TX SKBs:
> WARNING: kernel/softirq.c:430 at __local_bh_enable_ip+0x174/0x188, CPU#0: ksoftirqd/0/15
> Modules linked in:
> CPU: 0 UID: 0 PID: 15 Comm: ksoftirqd/0 Not tainted 7.0.0-rc4-next-20260319-yocto-standard-dirty #37 PREEMPT
> Hardware name: ZynqMP ZCU102 Rev1.1 (DT)
> pstate: 200000c5 (nzCv daIF -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
> pc : __local_bh_enable_ip+0x174/0x188
> lr : local_bh_enable+0x24/0x38
> sp : ffff800082b3bb10
> x29: ffff800082b3bb10 x28: ffff0008031f3c00 x27: 000000000011ede0
> x26: ffff000800a7ff00 x25: ffff800083937ce8 x24: 0000000000017a80
> x23: ffff000803243a78 x22: 0000000000000040 x21: 0000000000000000
> x20: ffff000800394c80 x19: 0000000000000200 x18: 0000000000000001
> x17: 0000000000000001 x16: ffff000803240000 x15: 0000000000000000
> x14: ffffffffffffffff x13: 0000000000000028 x12: ffff000800395650
> x11: ffff8000821d1528 x10: ffff800081c2bc08 x9 : ffff800081c1e258
> x8 : 0000000100000301 x7 : ffff8000810426ec x6 : 0000000000000000
> x5 : 0000000000000001 x4 : 0000000000000001 x3 : 0000000000000000
> x2 : 0000000000000008 x1 : 0000000000000200 x0 : ffff8000810428dc
> Call trace:
> __local_bh_enable_ip+0x174/0x188 (P)
> local_bh_enable+0x24/0x38
> skb_attempt_defer_free+0x190/0x1d8
> napi_consume_skb+0x58/0x108
> macb_tx_poll+0x1a4/0x558
> __napi_poll+0x50/0x198
> net_rx_action+0x1f4/0x3d8
> handle_softirqs+0x16c/0x560
> run_ksoftirqd+0x44/0x80
> smpboot_thread_fn+0x1d8/0x338
> kthread+0x120/0x150
> ret_from_fork+0x10/0x20
> irq event stamp: 29751
> hardirqs last enabled at (29750): [<ffff8000813be184>] _raw_spin_unlock_irqrestore+0x44/0x88
> hardirqs last disabled at (29751): [<ffff8000813bdf60>] _raw_spin_lock_irqsave+0x38/0x98
> softirqs last enabled at (29150): [<ffff8000800f1aec>] handle_softirqs+0x504/0x560
> softirqs last disabled at (29153): [<ffff8000800f2fec>] run_ksoftirqd+0x44/0x80
>
> Fixes: 6bc8a5098bf4 ("net: macb: Fix tx_ptr_lock locking")
> Signed-off-by: Kevin Hao <haokexin@gmail.com>
> Cc: stable@vger.kernel.org
Reviewed-by: Simon Horman <horms@kernel.org>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net] net: macb: Use dev_consume_skb_any() to free TX SKBs
2026-03-21 14:04 [PATCH net] net: macb: Use dev_consume_skb_any() to free TX SKBs Kevin Hao
2026-03-23 16:43 ` Simon Horman
@ 2026-03-24 12:30 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2026-03-24 12:30 UTC (permalink / raw)
To: Kevin Hao
Cc: nicolas.ferre, claudiu.beznea, andrew+netdev, davem, edumazet,
kuba, pabeni, sean.anderson, netdev, stable
Hello:
This patch was applied to netdev/net.git (main)
by Paolo Abeni <pabeni@redhat.com>:
On Sat, 21 Mar 2026 22:04:41 +0800 you wrote:
> The napi_consume_skb() function is not intended to be called in an IRQ
> disabled context. However, after commit 6bc8a5098bf4 ("net: macb: Fix
> tx_ptr_lock locking"), the freeing of TX SKBs is performed with IRQs
> disabled. To resolve the following call trace, use dev_consume_skb_any()
> for freeing TX SKBs:
> WARNING: kernel/softirq.c:430 at __local_bh_enable_ip+0x174/0x188, CPU#0: ksoftirqd/0/15
> Modules linked in:
> CPU: 0 UID: 0 PID: 15 Comm: ksoftirqd/0 Not tainted 7.0.0-rc4-next-20260319-yocto-standard-dirty #37 PREEMPT
> Hardware name: ZynqMP ZCU102 Rev1.1 (DT)
> pstate: 200000c5 (nzCv daIF -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
> pc : __local_bh_enable_ip+0x174/0x188
> lr : local_bh_enable+0x24/0x38
> sp : ffff800082b3bb10
> x29: ffff800082b3bb10 x28: ffff0008031f3c00 x27: 000000000011ede0
> x26: ffff000800a7ff00 x25: ffff800083937ce8 x24: 0000000000017a80
> x23: ffff000803243a78 x22: 0000000000000040 x21: 0000000000000000
> x20: ffff000800394c80 x19: 0000000000000200 x18: 0000000000000001
> x17: 0000000000000001 x16: ffff000803240000 x15: 0000000000000000
> x14: ffffffffffffffff x13: 0000000000000028 x12: ffff000800395650
> x11: ffff8000821d1528 x10: ffff800081c2bc08 x9 : ffff800081c1e258
> x8 : 0000000100000301 x7 : ffff8000810426ec x6 : 0000000000000000
> x5 : 0000000000000001 x4 : 0000000000000001 x3 : 0000000000000000
> x2 : 0000000000000008 x1 : 0000000000000200 x0 : ffff8000810428dc
> Call trace:
> __local_bh_enable_ip+0x174/0x188 (P)
> local_bh_enable+0x24/0x38
> skb_attempt_defer_free+0x190/0x1d8
> napi_consume_skb+0x58/0x108
> macb_tx_poll+0x1a4/0x558
> __napi_poll+0x50/0x198
> net_rx_action+0x1f4/0x3d8
> handle_softirqs+0x16c/0x560
> run_ksoftirqd+0x44/0x80
> smpboot_thread_fn+0x1d8/0x338
> kthread+0x120/0x150
> ret_from_fork+0x10/0x20
> irq event stamp: 29751
> hardirqs last enabled at (29750): [<ffff8000813be184>] _raw_spin_unlock_irqrestore+0x44/0x88
> hardirqs last disabled at (29751): [<ffff8000813bdf60>] _raw_spin_lock_irqsave+0x38/0x98
> softirqs last enabled at (29150): [<ffff8000800f1aec>] handle_softirqs+0x504/0x560
> softirqs last disabled at (29153): [<ffff8000800f2fec>] run_ksoftirqd+0x44/0x80
>
> [...]
Here is the summary with links:
- [net] net: macb: Use dev_consume_skb_any() to free TX SKBs
https://git.kernel.org/netdev/net/c/647b8a2fe474
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] 3+ messages in thread
end of thread, other threads:[~2026-03-24 12:30 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-21 14:04 [PATCH net] net: macb: Use dev_consume_skb_any() to free TX SKBs Kevin Hao
2026-03-23 16:43 ` Simon Horman
2026-03-24 12:30 ` 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