The card interrupt can queue card_detect_work after shutdown cancels it but before interrupts are disabled. The worker can then access the controller after pci_disable_device(), and can enable card interrupts again while processing the event. Disable and drain the delayed work before turning off interrupts and the PCI device. Later queue attempts are rejected while the IRQ handler can still acknowledge events until interrupt teardown completes. Fixes: 67e054e91924 ("mtd: nand: Add driver for Ricoh xD/SmartMedia reader") Cc: stable@vger.kernel.org Signed-off-by: James Hilliard --- drivers/mtd/nand/raw/r852.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mtd/nand/raw/r852.c b/drivers/mtd/nand/raw/r852.c index 92c47d351c27..bf1c1be7f2aa 100644 --- a/drivers/mtd/nand/raw/r852.c +++ b/drivers/mtd/nand/raw/r852.c @@ -1007,7 +1007,7 @@ static void r852_shutdown(struct pci_dev *pci_dev) { struct r852_device *dev = pci_get_drvdata(pci_dev); - cancel_delayed_work_sync(&dev->card_detect_work); + disable_delayed_work_sync(&dev->card_detect_work); r852_disable_irqs(dev); synchronize_irq(dev->irq); pci_disable_device(pci_dev); --- base-commit: 30daaf3e7897b4a8d9b72e5b0c86dd6e2a4d7d85 change-id: 20261107-submit-r852-shutdown-work-v1-15fe04537064 Best regards, -- James Hilliard