Skip to content

Commit f9a089d

Browse files
Loic Poulaingregkh
authored andcommitted
drm: bridge: anx7625: Fix NULL pointer dereference with early IRQ
[ Upstream commit a10f910 ] If the interrupt occurs before resource initialization is complete, the interrupt handler/worker may access uninitialized data such as the I2C tcpc_client device, potentially leading to NULL pointer dereference. Signed-off-by: Loic Poulain <loic.poulain@oss.qualcomm.com> Fixes: 8bdfc5d ("drm/bridge: anx7625: Add anx7625 MIPI DSI/DPI to DP") Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> Link: https://lore.kernel.org/r/20250709085438.56188-1-loic.poulain@oss.qualcomm.com Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 509e5c2 commit f9a089d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

drivers/gpu/drm/bridge/analogix/anx7625.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2697,7 +2697,7 @@ static int anx7625_i2c_probe(struct i2c_client *client)
26972697
ret = devm_request_threaded_irq(dev, platform->pdata.intp_irq,
26982698
NULL, anx7625_intr_hpd_isr,
26992699
IRQF_TRIGGER_FALLING |
2700-
IRQF_ONESHOT,
2700+
IRQF_ONESHOT | IRQF_NO_AUTOEN,
27012701
"anx7625-intp", platform);
27022702
if (ret) {
27032703
DRM_DEV_ERROR(dev, "fail to request irq\n");
@@ -2767,8 +2767,10 @@ static int anx7625_i2c_probe(struct i2c_client *client)
27672767
}
27682768

27692769
/* Add work function */
2770-
if (platform->pdata.intp_irq)
2770+
if (platform->pdata.intp_irq) {
2771+
enable_irq(platform->pdata.intp_irq);
27712772
queue_work(platform->workqueue, &platform->work);
2773+
}
27722774

27732775
if (platform->pdata.audio_en)
27742776
anx7625_register_audio(dev, platform);

0 commit comments

Comments
 (0)