From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6600B1C1ADB; Mon, 22 Sep 2025 19:46:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758570392; cv=none; b=bsJN1JZ1L33K9pkcKOwMQhI3zZumbMmCQ1cia1Li/UfANruDqvQF4zF8xgdwDlkot7sd0HgNqP14ZyQjvI0unLmePDN4vqcfv8NlNRvjrm5uraupv7WPj+c8meu3E6kEuIqUwfapcCiQogTzYDd2fAGlpmQOaERUc+gc4Orewh8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758570392; c=relaxed/simple; bh=xcGUOybTOVyN9wFoNwpJS3lMBd5tMtperaEM1pBcR2E=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=SPzwQaCC3o8/g6sMUbMLZJO7xvFkmqD3F2ynxNjQ/JFPDFru05m7mE7z4wRUpDw5P5D3xd2OzTO4xPK7x8k/w56CPKGGtBEFqfGl4kkt95ktZaf6qxnA9CYBUZ2GVJQ+7gkMXa4KBSOdJZAzZFJ2RNE4FlOwonpHZ4ZQc1MPf4o= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=KRjsG3bC; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="KRjsG3bC" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 02387C4CEF5; Mon, 22 Sep 2025 19:46:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1758570392; bh=xcGUOybTOVyN9wFoNwpJS3lMBd5tMtperaEM1pBcR2E=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KRjsG3bCSGmc/zGvnPkAnuPk1Mwfau8bIjQBR5MbUGrX8SN7KB9CHm+PC/wz+Fa6/ bImWCoENLQBONhUuM/tB270hquC5JIwVjxqc/7pMQDj+AICbz67ZjLUJb8/vDOW4yI NJAmxi07I/zI9ew9+YiL1aJ/ZfTiHPCxJtArYATM= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Loic Poulain , Dmitry Baryshkov , Sasha Levin Subject: [PATCH 6.16 119/149] drm: bridge: anx7625: Fix NULL pointer dereference with early IRQ Date: Mon, 22 Sep 2025 21:30:19 +0200 Message-ID: <20250922192415.875967816@linuxfoundation.org> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20250922192412.885919229@linuxfoundation.org> References: <20250922192412.885919229@linuxfoundation.org> User-Agent: quilt/0.68 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.16-stable review patch. If anyone has any objections, please let me know. ------------------ From: Loic Poulain [ Upstream commit a10f910c77f280327b481e77eab909934ec508f0 ] 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 Fixes: 8bdfc5dae4e3 ("drm/bridge: anx7625: Add anx7625 MIPI DSI/DPI to DP") Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20250709085438.56188-1-loic.poulain@oss.qualcomm.com Signed-off-by: Dmitry Baryshkov Signed-off-by: Sasha Levin --- drivers/gpu/drm/bridge/analogix/anx7625.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/bridge/analogix/anx7625.c b/drivers/gpu/drm/bridge/analogix/anx7625.c index 8a9079c2ed5c2..8257132a8ee9d 100644 --- a/drivers/gpu/drm/bridge/analogix/anx7625.c +++ b/drivers/gpu/drm/bridge/analogix/anx7625.c @@ -2678,7 +2678,7 @@ static int anx7625_i2c_probe(struct i2c_client *client) ret = devm_request_threaded_irq(dev, platform->pdata.intp_irq, NULL, anx7625_intr_hpd_isr, IRQF_TRIGGER_FALLING | - IRQF_ONESHOT, + IRQF_ONESHOT | IRQF_NO_AUTOEN, "anx7625-intp", platform); if (ret) { DRM_DEV_ERROR(dev, "fail to request irq\n"); @@ -2747,8 +2747,10 @@ static int anx7625_i2c_probe(struct i2c_client *client) } /* Add work function */ - if (platform->pdata.intp_irq) + if (platform->pdata.intp_irq) { + enable_irq(platform->pdata.intp_irq); queue_work(platform->workqueue, &platform->work); + } if (platform->pdata.audio_en) anx7625_register_audio(dev, platform); -- 2.51.0