[PATCH] drm/mediatek: Initialize pointer in mtk_drm_of_ddp_path_build_one()

Alexandre Mergnat amergnat at baylibre.com
Mon Dec 2 02:50:19 PST 2024


On Tue, Nov 12, 2024 at 11:50 AM AngeloGioacchino Del Regno
<angelogioacchino.delregno at collabora.com> wrote:
>
> The struct device_node *next pointer is not initialized, and it is
> used in an error path in which it may have never been modified by
> function mtk_drm_of_get_ddp_ep_cid().
>
> Since the error path is relying on that pointer being NULL for the
> OVL Adaptor and/or invalid component check and since said pointer
> is being used in prints for %pOF, in the case that it points to a
> bogus address, the print may cause a KP.
>
> To resolve that, initialize the *next pointer to NULL before usage.
>

Reviewed-by: Alexandre Mergnat <amergnat at baylibre.com>



More information about the linux-arm-kernel mailing list