From: Arina Kharlamova <[email protected]>
The HPD interrupt is requested with devm_request_threaded_irq(), so it
is only freed after anx7625_i2c_remove() returns. The remove callback
destroys the workqueue that the interrupt handler queues work on while
the interrupt is still enabled. An HPD edge in that window makes
anx7625_intr_hpd_isr() call queue_work() on a destroyed workqueue.
Disable the interrupt before the workqueue is destroyed. disable_irq()
also waits for a running handler to finish.
Fixes: 8bdfc5dae4e3 ("drm/bridge: anx7625: Add anx7625 MIPI DSI/DPI to DP")
Signed-off-by: Arina Kharlamova <[email protected]>
---
Found by checks derived from the spec2patch kernel API specifications,
with the help of an AI coding assistant (Claude); I reviewed the
analysis and the fix.
---
drivers/gpu/drm/bridge/analogix/anx7625.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/bridge/analogix/anx7625.c
b/drivers/gpu/drm/bridge/analogix/anx7625.c
index c3af88e14f8b..f217eedab4b9 100644
--- a/drivers/gpu/drm/bridge/analogix/anx7625.c
+++ b/drivers/gpu/drm/bridge/analogix/anx7625.c
@@ -2977,8 +2977,10 @@ static void anx7625_i2c_remove(struct i2c_client *client)
drm_bridge_remove(&platform->bridge);
- if (platform->pdata.intp_irq)
+ if (platform->pdata.intp_irq) {
+ disable_irq(platform->pdata.intp_irq);
destroy_workqueue(platform->workqueue);
+ }
if (platform->hdcp_workqueue) {
cancel_delayed_work(&platform->hdcp_work);
---
base-commit: 25faec9ce61c01fb45abf812a222c5b43c3cd5c5
change-id: 20261129-s2p-d31-3482accfd8b0
Best regards,
--
Arina Kharlamova <[email protected]>