* [RFC PATCH 6.6.y] atm: he: kill tasklet before releasing queues
@ 2026-07-24 5:27 Hongyan Xu
2026-07-24 5:45 ` Greg KH
0 siblings, 1 reply; 3+ messages in thread
From: Hongyan Xu @ 2026-07-24 5:27 UTC (permalink / raw)
To: gregkh, sashal
Cc: 3chas3, stable, linux-atm-general, netdev, linux-kernel,
jianhao.xu, getshell
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [RFC PATCH 6.6.y] atm: he: kill tasklet before releasing queues
2026-07-24 5:27 [RFC PATCH 6.6.y] atm: he: kill tasklet before releasing queues Hongyan Xu
@ 2026-07-24 5:45 ` Greg KH
[not found] ` <AIYAKgAhKje-OvrUBw*N1are.3.1785069041661.Hmail.220255774@seu.edu.cn>
0 siblings, 1 reply; 3+ messages in thread
From: Greg KH @ 2026-07-24 5:45 UTC (permalink / raw)
To: Hongyan Xu
Cc: sashal, 3chas3, stable, linux-atm-general, netdev, linux-kernel,
jianhao.xu
On Fri, Jul 24, 2026 at 01:27:10PM +0800, Hongyan Xu wrote:
> 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.
Why don't we just delete the driver instead as obviously no one uses
this. Unless you have the hardware to test these changes?
thanks,
greg k-h
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Re: [RFC PATCH 6.6.y] atm: he: kill tasklet before releasing queues
[not found] ` <AIYAKgAhKje-OvrUBw*N1are.3.1785069041661.Hmail.220255774@seu.edu.cn>
@ 2026-07-26 12:50 ` Greg KH
0 siblings, 0 replies; 3+ messages in thread
From: Greg KH @ 2026-07-26 12:50 UTC (permalink / raw)
To: 许红岩
Cc: sashal, 3chas3, stable, linux-atm-general, netdev, linux-kernel
On Sun, Jul 26, 2026 at 08:30:41PM +0800, 许红岩 wrote:
>
>
> Thanks greg k-h
> I do not have the HE hardware, so the patch has only been build-tested and
> reviewed against the teardown path.
Then why create these patches at all? What is driving the need for
them?
> Given that the driver has already been removed upstream, I agree that deleting
> it from maintained stable trees would be cleaner if that is acceptable for
> stable. I sent the small fix only because the driver is still present there
> and I did not want to backport the much larger ATM removal commit.
But if you don't have the hardware, and don't use this driver, why do
this at all? Why even look at older kernel versions for stuff that is
not used?
> I can prepare a stable-only removal patch for
> the HE driver instead, or backport the relevant upstream removal pieces if that
> is preferred.
As no one uses these drivers, due to lack of hardware and the like, they
can't be abused at all, so just leave them alone for older kernels, no
need to delete them as they do not cause any additional burden there at
all.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-07-26 12:51 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-24 5:27 [RFC PATCH 6.6.y] atm: he: kill tasklet before releasing queues Hongyan Xu
2026-07-24 5:45 ` Greg KH
[not found] ` <AIYAKgAhKje-OvrUBw*N1are.3.1785069041661.Hmail.220255774@seu.edu.cn>
2026-07-26 12:50 ` Greg KH
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.