From: Jiale Yao <yaojiale02@163.com>
To: Andrew Lunn <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@kernel.org>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
David Daney <ddaney@caviumnetworks.com>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: Jiale Yao <yaojiale02@163.com>
Subject: [PATCH] net: octeon: mgmt: drain TX cleanup tasklet on stop
Date: Sun, 18 Oct 2026 12:06:34 +0800 [thread overview]
Message-ID: <20261018040634.533757-1-yaojiale02@163.com> (raw)
The management port IRQ schedules tx_clean_tasklet after disabling TX
interrupts. free_irq() stops the hard IRQ, but a tasklet queued before
that point can still access the TX queue, ring and device registers
while ndo_stop releases them.
Kill the tasklet after freeing the IRQ and before purging the queues and
freeing the rings.
Fixes: d6aa60a10b2f ("NET: Add Ethernet driver for Octeon MGMT devices.")
Signed-off-by: Jiale Yao <yaojiale02@163.com>
---
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.34.1
next reply other threads:[~2026-10-18 4:07 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-18 4:06 Jiale Yao [this message]
2026-10-18 4:13 ` [PATCH] net: octeon: mgmt: drain TX cleanup tasklet on stop 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=20261018040634.533757-1-yaojiale02@163.com \
--to=yaojiale02@163.com \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=ddaney@caviumnetworks.com \
--cc=edumazet@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
/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