Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm: bridge: anx7625: Fix NULL pointer dereference with early IRQ

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: 8bdfc5dae4e3 ("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>

authored by

Loic Poulain and committed by
Dmitry Baryshkov
a10f910c 07c24945

+4 -2
+4 -2
drivers/gpu/drm/bridge/analogix/anx7625.c
··· 2677 2677 ret = devm_request_threaded_irq(dev, platform->pdata.intp_irq, 2678 2678 NULL, anx7625_intr_hpd_isr, 2679 2679 IRQF_TRIGGER_FALLING | 2680 - IRQF_ONESHOT, 2680 + IRQF_ONESHOT | IRQF_NO_AUTOEN, 2681 2681 "anx7625-intp", platform); 2682 2682 if (ret) { 2683 2683 DRM_DEV_ERROR(dev, "fail to request irq\n"); ··· 2746 2746 } 2747 2747 2748 2748 /* Add work function */ 2749 - if (platform->pdata.intp_irq) 2749 + if (platform->pdata.intp_irq) { 2750 + enable_irq(platform->pdata.intp_irq); 2750 2751 queue_work(platform->workqueue, &platform->work); 2752 + } 2751 2753 2752 2754 if (platform->pdata.audio_en) 2753 2755 anx7625_register_audio(dev, platform);