* [PATCH v2 resend 0/4] net: don't call dev_kfree_skb() under spin_lock_irqsave()
@ 2022-12-08 3:26 Yang Yingliang
2022-12-08 3:26 ` [PATCH v2 resend 1/4] net: emaclite: " Yang Yingliang
2022-12-08 9:29 ` [PATCH v2 resend 0/4] net: " Leon Romanovsky
0 siblings, 2 replies; 4+ messages in thread
From: Yang Yingliang @ 2022-12-08 3:26 UTC (permalink / raw)
To: netdev
Cc: davem, edumazet, kuba, pabeni, Yang Yingliang, Michal Simek,
John Linn, Sadanand M, linux-arm-kernel, Ilya Yanok, Joerg Reuter,
linux-hams
It is not allowed to call consume_skb() from hardware interrupt context
or with interrupts being disabled. This patchset replace dev_kfree_skb()
with dev_consume_skb_irq() under spin_lock_irqsave() in some drivers, or
move dev_kfree_skb() after spin_unlock_irqrestore().
Resend for CC all authors / reviewers of commits under "Fixes:".
v1 -> v2:
patch #2 Move dev_kfree_skb() after spin_unlock_irqrestore()
Yang Yingliang (4):
net: emaclite: don't call dev_kfree_skb() under spin_lock_irqsave()
net: ethernet: dnet: don't call dev_kfree_skb() under
spin_lock_irqsave()
hamradio: don't call dev_kfree_skb() under spin_lock_irqsave()
net: amd: lance: don't call dev_kfree_skb() under spin_lock_irqsave()
drivers/net/ethernet/amd/atarilance.c | 2 +-
drivers/net/ethernet/amd/lance.c | 2 +-
drivers/net/ethernet/dnet.c | 4 ++--
drivers/net/ethernet/xilinx/xilinx_emaclite.c | 2 +-
drivers/net/hamradio/scc.c | 6 +++---
5 files changed, 8 insertions(+), 8 deletions(-)
--
2.25.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH v2 resend 1/4] net: emaclite: don't call dev_kfree_skb() under spin_lock_irqsave()
2022-12-08 3:26 [PATCH v2 resend 0/4] net: don't call dev_kfree_skb() under spin_lock_irqsave() Yang Yingliang
@ 2022-12-08 3:26 ` Yang Yingliang
2022-12-08 9:25 ` Harini Katakam
2022-12-08 9:29 ` [PATCH v2 resend 0/4] net: " Leon Romanovsky
1 sibling, 1 reply; 4+ messages in thread
From: Yang Yingliang @ 2022-12-08 3:26 UTC (permalink / raw)
To: netdev
Cc: davem, edumazet, kuba, pabeni, Yang Yingliang, Michal Simek,
John Linn, Sadanand M, linux-arm-kernel
It is not allowed to call consume_skb() from hardware interrupt context
or with interrupts being disabled. So replace dev_kfree_skb() with
dev_consume_skb_irq() under spin_lock_irqsave().
Fixes: bb81b2ddfa19 ("net: add Xilinx emac lite device driver")
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
---
drivers/net/ethernet/xilinx/xilinx_emaclite.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/xilinx/xilinx_emaclite.c b/drivers/net/ethernet/xilinx/xilinx_emaclite.c
index a3967f8de417..a1e1387ea84e 100644
--- a/drivers/net/ethernet/xilinx/xilinx_emaclite.c
+++ b/drivers/net/ethernet/xilinx/xilinx_emaclite.c
@@ -536,7 +536,7 @@ static void xemaclite_tx_timeout(struct net_device *dev, unsigned int txqueue)
xemaclite_enable_interrupts(lp);
if (lp->deferred_skb) {
- dev_kfree_skb(lp->deferred_skb);
+ dev_consume_skb_irq(lp->deferred_skb);
lp->deferred_skb = NULL;
dev->stats.tx_errors++;
}
--
2.25.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v2 resend 1/4] net: emaclite: don't call dev_kfree_skb() under spin_lock_irqsave()
2022-12-08 3:26 ` [PATCH v2 resend 1/4] net: emaclite: " Yang Yingliang
@ 2022-12-08 9:25 ` Harini Katakam
0 siblings, 0 replies; 4+ messages in thread
From: Harini Katakam @ 2022-12-08 9:25 UTC (permalink / raw)
To: Yang Yingliang
Cc: netdev, davem, edumazet, kuba, pabeni, Michal Simek, John Linn,
Sadanand M, linux-arm-kernel
On Thu, Dec 8, 2022 at 9:04 AM Yang Yingliang <yangyingliang@huawei.com> wrote:
>
> It is not allowed to call consume_skb() from hardware interrupt context
> or with interrupts being disabled. So replace dev_kfree_skb() with
> dev_consume_skb_irq() under spin_lock_irqsave().
>
> Fixes: bb81b2ddfa19 ("net: add Xilinx emac lite device driver")
> Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Thanks for the patch Yang
Reviewed-by: Harini Katakam <harini.katakam@amd.com>
Regards,
Harini
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2 resend 0/4] net: don't call dev_kfree_skb() under spin_lock_irqsave()
2022-12-08 3:26 [PATCH v2 resend 0/4] net: don't call dev_kfree_skb() under spin_lock_irqsave() Yang Yingliang
2022-12-08 3:26 ` [PATCH v2 resend 1/4] net: emaclite: " Yang Yingliang
@ 2022-12-08 9:29 ` Leon Romanovsky
1 sibling, 0 replies; 4+ messages in thread
From: Leon Romanovsky @ 2022-12-08 9:29 UTC (permalink / raw)
To: Yang Yingliang
Cc: netdev, davem, edumazet, kuba, pabeni, Michal Simek, John Linn,
Sadanand M, linux-arm-kernel, Ilya Yanok, Joerg Reuter,
linux-hams
On Thu, Dec 08, 2022 at 11:26:51AM +0800, Yang Yingliang wrote:
> It is not allowed to call consume_skb() from hardware interrupt context
> or with interrupts being disabled. This patchset replace dev_kfree_skb()
> with dev_consume_skb_irq() under spin_lock_irqsave() in some drivers, or
> move dev_kfree_skb() after spin_unlock_irqrestore().
Like I said it to you already. You MUST explain why dev_consume_skb_irq()
was chosen over dev_kfree_skb_irq().
Thanks
>
> Resend for CC all authors / reviewers of commits under "Fixes:".
>
> v1 -> v2:
> patch #2 Move dev_kfree_skb() after spin_unlock_irqrestore()
>
> Yang Yingliang (4):
> net: emaclite: don't call dev_kfree_skb() under spin_lock_irqsave()
> net: ethernet: dnet: don't call dev_kfree_skb() under
> spin_lock_irqsave()
> hamradio: don't call dev_kfree_skb() under spin_lock_irqsave()
> net: amd: lance: don't call dev_kfree_skb() under spin_lock_irqsave()
>
> drivers/net/ethernet/amd/atarilance.c | 2 +-
> drivers/net/ethernet/amd/lance.c | 2 +-
> drivers/net/ethernet/dnet.c | 4 ++--
> drivers/net/ethernet/xilinx/xilinx_emaclite.c | 2 +-
> drivers/net/hamradio/scc.c | 6 +++---
> 5 files changed, 8 insertions(+), 8 deletions(-)
>
> --
> 2.25.1
>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-12-08 9:42 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-08 3:26 [PATCH v2 resend 0/4] net: don't call dev_kfree_skb() under spin_lock_irqsave() Yang Yingliang
2022-12-08 3:26 ` [PATCH v2 resend 1/4] net: emaclite: " Yang Yingliang
2022-12-08 9:25 ` Harini Katakam
2022-12-08 9:29 ` [PATCH v2 resend 0/4] net: " Leon Romanovsky
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).