From: Hongyan Xu <getshell@seu.edu.cn>
To: gregkh@linuxfoundation.org, sashal@kernel.org
Cc: 3chas3@gmail.com, stable@vger.kernel.org,
linux-atm-general@lists.sourceforge.net, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, jianhao.xu@seu.edu.cn,
getshell@seu.edu.cn
Subject: [RFC PATCH 6.6.y] atm: he: kill tasklet before releasing queues
Date: Fri, 24 Jul 2026 13:27:10 +0800 [thread overview]
Message-ID: <20260724052710.1126-1-getshell@seu.edu.cn> (raw)
The interrupt handler schedules a tasklet which accesses the device queues.
tasklet_disable() waits for a running instance, but leaves a scheduled
instance pending while he_stop() releases those queues and the device.
After masking device interrupts, unregister the IRQ so the handler can no
longer schedule the tasklet, then kill the tasklet before releasing any of
its data.
The affected driver was removed upstream by commit 6deb53595092 ("net:
remove unused ATM protocols and legacy ATM device drivers"). This change
is intended for maintained stable kernels which still carry the driver.
Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Cc: stable@vger.kernel.org
Signed-off-by: Hongyan Xu <getshell@seu.edu.cn>
---
drivers/atm/he.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/drivers/atm/he.c b/drivers/atm/he.c
index 92a041d..6b2c795 100644
--- a/drivers/atm/he.c
+++ b/drivers/atm/he.c
@@ -1536,9 +1536,13 @@ he_stop(struct he_dev *he_dev)
pci_read_config_dword(pci_dev, GEN_CNTL_0, &gen_cntl_0);
gen_cntl_0 &= ~(INT_PROC_ENBL | INIT_ENB);
pci_write_config_dword(pci_dev, GEN_CNTL_0, gen_cntl_0);
+ }
- tasklet_disable(&he_dev->tasklet);
+ if (he_dev->irq)
+ free_irq(he_dev->irq, he_dev);
+ tasklet_kill(&he_dev->tasklet);
+ if (he_dev->membase) {
/* disable recv and transmit */
reg = he_readl_mbox(he_dev, CS_ERCTL0);
@@ -1555,9 +1559,6 @@ he_stop(struct he_dev *he_dev)
he_dev->atm_dev->phy->stop(he_dev->atm_dev);
#endif /* CONFIG_ATM_HE_USE_SUNI */
- if (he_dev->irq)
- free_irq(he_dev->irq, he_dev);
-
if (he_dev->irq_base)
dma_free_coherent(&he_dev->pci_dev->dev, (CONFIG_IRQ_SIZE + 1)
* sizeof(struct he_irq), he_dev->irq_base, he_dev->irq_phys);
--
2.50.1.windows.1
next reply other threads:[~2026-07-24 5:27 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-24 5:27 Hongyan Xu [this message]
2026-07-24 5:45 ` [RFC PATCH 6.6.y] atm: he: kill tasklet before releasing queues Greg KH
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=20260724052710.1126-1-getshell@seu.edu.cn \
--to=getshell@seu.edu.cn \
--cc=3chas3@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=jianhao.xu@seu.edu.cn \
--cc=linux-atm-general@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=sashal@kernel.org \
--cc=stable@vger.kernel.org \
/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