From: Hongyan Xu <getshell@seu.edu.cn>
To: andrew+netdev@lunn.ch, davem@davemloft.net
Cc: edumazet@kernel.org, kuba@kernel.org, pabeni@redhat.com,
vadim.fedorenko@linux.dev, kory.maincent@bootlin.com,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
jianhao.xu@seu.edu.cn, Hongyan Xu <getshell@seu.edu.cn>
Subject: [PATCH net] net: octeon_mgmt: kill TX tasklet before freeing rings
Date: Mon, 28 Sep 2026 21:41:25 +0800 [thread overview]
Message-ID: <20260928134125.2003-1-getshell@seu.edu.cn> (raw)
The interrupt handler schedules tx_clean_tasklet, which dereferences the
private state and TX ring. free_irq() prevents new scheduling but does
not wait for a tasklet that was already queued.
Kill the tasklet after freeing the interrupt and before purging and
freeing the DMA rings.
Fixes: d6aa60a10b2f ("NET: Add Ethernet driver for Octeon MGMT devices.")
Signed-off-by: Hongyan Xu <getshell@seu.edu.cn>
---
drivers/net/ethernet/cavium/octeon/octeon_mgmt.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/ethernet/cavium/octeon/octeon_mgmt.c b/drivers/net/ethernet/cavium/octeon/octeon_mgmt.c
index c190fc6538d4..2cf3365b9636 100644
--- a/drivers/net/ethernet/cavium/octeon/octeon_mgmt.c
+++ b/drivers/net/ethernet/cavium/octeon/octeon_mgmt.c
@@ -1254,6 +1254,7 @@ static int octeon_mgmt_stop(struct net_device *netdev)
octeon_mgmt_reset_hw(p);
free_irq(p->irq, netdev);
+ tasklet_kill(&p->tx_clean_tasklet);
/* dma_unmap is a nop on Octeon, so just free everything. */
skb_queue_purge(&p->tx_list);
--
2.50.1.windows.1
next reply other threads:[~2026-09-28 13:41 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-28 13:41 Hongyan Xu [this message]
2026-09-28 13:45 ` netdev-bot+sinfo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260928134125.2003-1-getshell@seu.edu.cn \
--to=getshell@seu.edu.cn \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@kernel.org \
--cc=jianhao.xu@seu.edu.cn \
--cc=kory.maincent@bootlin.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=vadim.fedorenko@linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®