Skip to content
Commit 03e63e49 authored by Stuart Lee's avatar Stuart Lee Committed by Greg Kroah-Hartman
Browse files

drm/mediatek: Fix access violation in mtk_drm_crtc_dma_dev_get



commit b6961d18 upstream.

Add error handling to check NULL input in
mtk_drm_crtc_dma_dev_get function.

While display path is not configured correctly, none of crtc is
established. So the caller of mtk_drm_crtc_dma_dev_get may pass
input parameter *crtc as NULL, Which may cause coredump when
we try to get the container of NULL pointer.

Fixes: cb1d6bcc ("drm/mediatek: Add dma dev get function")
Signed-off-by: default avatarStuart Lee <stuart.lee@mediatek.com>
Cc: stable@vger.kernel.org
Reviewed-by: default avatarAngeloGioacchino DEl Regno <angelogioacchino.delregno@collabora.com>
Tested-by: default avatarMacpaul Lin <macpaul.lin@mediatek.com>
Link: https://patchwork.kernel.org/project/dri-devel/patch/20231110012914.14884-2-stuart.lee@mediatek.com/


Signed-off-by: default avatarChun-Kuang Hu <chunkuang.hu@kernel.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 3aae4ef4
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment