pcmcia: bcm63xx: unregister socket before freeing it
PATCH 1/1 pcmcia: bcm63xx: unregister socket before freeing it
bcm63xx_drv_pcmcia_remove() stops the polling timer and frees the socket without unregistering it from the PCMCIA core. This leaves the socket on the core's list with its thread and device still active, referencing freed driver state.
Unregister the socket after stopping the timer and before releasing its resources.
Fixes 553d6d5f5b84 ("MIPS: BCM63xx: Add PCMCIA & Cardbus support.")
Signed-off-by Avi Weiss <[email protected]>
---
1 file changed, 1 insertion(+)
drivers/pcmcia/bcm63xx_pcmcia.c +1 -0
@@ -444,6 +444,7 @@ static void bcm63xx_drv_pcmcia_remove(struct platform_device *pdev) skt =platform_get_drvdata (pdev);timer_shutdown_sync (&skt->timer); +pcmcia_unregister_socket (&skt->socket);iounmap (skt->base);iounmap (skt->io_base); res = skt->reg_res;
base-commit: d135ab453a7400a34930bdda1ef4bdc8acfac80e
Signature · 1 line
2.43.0