Skip to contentSkip to conversation

Patch "drm/mediatek/dp: fix memory leak on ->get_edid callback error path" has been added to the 6.1-stable tree

PATCH [email protected] 1 participant 1 message Nov 24, 2023

Subsystems (3)
lore
Share & tools
lore

[email protected]

author Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

    drm/mediatek/dp: fix memory leak on ->get_edid callback error path

to the 6.1-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
drm-mediatek-dp-fix-memory-leak-on-get_edid-callback-error-path.patch
and it can be found in the queue-6.1 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

From fcaf9761fd5884a64eaac48536f8c27ecfd2e6bc Mon Sep 17 00:00:00 2001
From: Jani Nikula <[email protected]>
Date: Thu, 14 Sep 2023 16:10:58 +0300
Subject: drm/mediatek/dp: fix memory leak on ->get_edid callback error path

From: Jani Nikula <[email protected]>

commit fcaf9761fd5884a64eaac48536f8c27ecfd2e6bc upstream.

Setting new_edid to NULL leaks the buffer.

Fixes f70ac097a2cf ("drm/mediatek: Add MT8195 Embedded DisplayPort driver")
Cc Markus Schneider-Pargmann <[email protected]>
Cc Guillaume Ranquet <[email protected]>
Cc Bo-Chen Chen <[email protected]>
Cc AngeloGioacchino Del Regno <[email protected]>
Cc Dmitry Osipenko <[email protected]>
Cc Chun-Kuang Hu <[email protected]>
Cc Philipp Zabel <[email protected]>
Cc Matthias Brugger <[email protected]>
Cc <[email protected]> # v6.1+
---
 drivers/gpu/drm/mediatek/mtk_dp.c |    1 +
 1 file changed, 1 insertion(+)
drivers/gpu/drm/mediatek/mtk_dp.c +1 -0
@@ -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;
 	}
 

Patches currently in stable-queue which might be from [email protected] are

queue-6.1/drm-msm-dp-skip-validity-check-for-dp-cts-edid-check.patch queue-6.1/i915-perf-fix-null-deref-bugs-with-drm_dbg-calls.patch queue-6.1/drm-mediatek-dp-fix-memory-leak-on-get_edid-callback-error-path.patch queue-6.1/drm-mediatek-dp-fix-memory-leak-on-get_edid-callback-audio-detection.patch