[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAAOTY_-Vn9eN+OjSWjo=WTrSasJs6h_N93PQgVAUU-NDeQ438Q@mail.gmail.com>
Date: Sun, 24 Sep 2023 22:40:04 +0800
From: Chun-Kuang Hu <chunkuang.hu@...nel.org>
To: Jani Nikula <jani.nikula@...el.com>
Cc: dri-devel@...ts.freedesktop.org,
Markus Schneider-Pargmann <msp@...libre.com>,
Guillaume Ranquet <granquet@...libre.com>,
Bo-Chen Chen <rex-bc.chen@...iatek.com>,
CK Hu <ck.hu@...iatek.com>,
AngeloGioacchino Del Regno
<angelogioacchino.delregno@...labora.com>,
Dmitry Osipenko <dmitry.osipenko@...labora.com>,
Chun-Kuang Hu <chunkuang.hu@...nel.org>,
Philipp Zabel <p.zabel@...gutronix.de>,
Matthias Brugger <matthias.bgg@...il.com>,
linux-mediatek@...ts.infradead.org, linux-kernel@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, stable@...r.kernel.org
Subject: Re: [PATCH] drm/mediatek/dp: fix memory leak on ->get_edid callback
error path
Hi, Jani:
Jani Nikula <jani.nikula@...el.com> 於 2023年9月14日 週四 下午9:13寫道:
>
> Setting new_edid to NULL leaks the buffer.
Applied to mediatek-drm-next [1], thanks.
[1] https://git.kernel.org/pub/scm/linux/kernel/git/chunkuang.hu/linux.git/log/?h=mediatek-drm-next
Regards,
Chun-Kuang.
>
> Fixes: f70ac097a2cf ("drm/mediatek: Add MT8195 Embedded DisplayPort driver")
> Cc: Markus Schneider-Pargmann <msp@...libre.com>
> Cc: Guillaume Ranquet <granquet@...libre.com>
> Cc: Bo-Chen Chen <rex-bc.chen@...iatek.com>
> Cc: CK Hu <ck.hu@...iatek.com>
> Cc: AngeloGioacchino Del Regno <angelogioacchino.delregno@...labora.com>
> Cc: Dmitry Osipenko <dmitry.osipenko@...labora.com>
> Cc: Chun-Kuang Hu <chunkuang.hu@...nel.org>
> Cc: Philipp Zabel <p.zabel@...gutronix.de>
> Cc: Matthias Brugger <matthias.bgg@...il.com>
> Cc: dri-devel@...ts.freedesktop.org
> Cc: linux-mediatek@...ts.infradead.org
> Cc: linux-kernel@...r.kernel.org
> Cc: linux-arm-kernel@...ts.infradead.org
> Cc: <stable@...r.kernel.org> # v6.1+
> Signed-off-by: Jani Nikula <jani.nikula@...el.com>
>
> ---
>
> UNTESTED
> ---
> drivers/gpu/drm/mediatek/mtk_dp.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/gpu/drm/mediatek/mtk_dp.c b/drivers/gpu/drm/mediatek/mtk_dp.c
> index 2cb47f663756..8fc6eff68e30 100644
> --- a/drivers/gpu/drm/mediatek/mtk_dp.c
> +++ b/drivers/gpu/drm/mediatek/mtk_dp.c
> @@ -2049,6 +2049,7 @@ static struct edid *mtk_dp_get_edid(struct drm_bridge *bridge,
> */
> if (mtk_dp_parse_capabilities(mtk_dp)) {
> drm_err(mtk_dp->drm_dev, "Can't parse capabilities\n");
> + kfree(new_edid);
> new_edid = NULL;
> }
>
> --
> 2.39.2
>
Powered by blists - more mailing lists