[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20231124172037.474108014@linuxfoundation.org>
Date: Fri, 24 Nov 2023 17:51:04 +0000
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: stable@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
patches@...ts.linux.dev,
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>,
dri-devel@...ts.freedesktop.org,
linux-mediatek@...ts.infradead.org, linux-kernel@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org,
Jani Nikula <jani.nikula@...el.com>
Subject: [PATCH 6.5 428/491] drm/mediatek/dp: fix memory leak on ->get_edid callback error path
6.5-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jani Nikula <jani.nikula@...el.com>
commit fcaf9761fd5884a64eaac48536f8c27ecfd2e6bc upstream.
Setting new_edid to NULL leaks the buffer.
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>
Reviewed-by: Guillaume Ranquet <granquet@...libre.com>
Link: https://patchwork.kernel.org/project/dri-devel/patch/20230914131058.2472260-1-jani.nikula@intel.com/
Signed-off-by: Chun-Kuang Hu <chunkuang.hu@...nel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
---
drivers/gpu/drm/mediatek/mtk_dp.c | 1 +
1 file changed, 1 insertion(+)
--- a/drivers/gpu/drm/mediatek/mtk_dp.c
+++ b/drivers/gpu/drm/mediatek/mtk_dp.c
@@ -2005,6 +2005,7 @@ static struct edid *mtk_dp_get_edid(stru
*/
if (mtk_dp_parse_capabilities(mtk_dp)) {
drm_err(mtk_dp->drm_dev, "Can't parse capabilities\n");
+ kfree(new_edid);
new_edid = NULL;
}
Powered by blists - more mailing lists