]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.19-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 17 Jun 2024 18:20:50 +0000 (20:20 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 17 Jun 2024 18:20:50 +0000 (20:20 +0200)
added patches:
drm-exynos-vidi-fix-memory-leak-in-.get_modes.patch

queue-4.19/drm-exynos-vidi-fix-memory-leak-in-.get_modes.patch [new file with mode: 0644]
queue-4.19/series

diff --git a/queue-4.19/drm-exynos-vidi-fix-memory-leak-in-.get_modes.patch b/queue-4.19/drm-exynos-vidi-fix-memory-leak-in-.get_modes.patch
new file mode 100644 (file)
index 0000000..4d29848
--- /dev/null
@@ -0,0 +1,42 @@
+From 38e3825631b1f314b21e3ade00b5a4d737eb054e Mon Sep 17 00:00:00 2001
+From: Jani Nikula <jani.nikula@intel.com>
+Date: Thu, 30 May 2024 13:01:51 +0300
+Subject: drm/exynos/vidi: fix memory leak in .get_modes()
+
+From: Jani Nikula <jani.nikula@intel.com>
+
+commit 38e3825631b1f314b21e3ade00b5a4d737eb054e upstream.
+
+The duplicated EDID is never freed. Fix it.
+
+Cc: stable@vger.kernel.org
+Signed-off-by: Jani Nikula <jani.nikula@intel.com>
+Signed-off-by: Inki Dae <inki.dae@samsung.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/gpu/drm/exynos/exynos_drm_vidi.c |    7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+--- a/drivers/gpu/drm/exynos/exynos_drm_vidi.c
++++ b/drivers/gpu/drm/exynos/exynos_drm_vidi.c
+@@ -302,6 +302,7 @@ static int vidi_get_modes(struct drm_con
+       struct vidi_context *ctx = ctx_from_connector(connector);
+       struct edid *edid;
+       int edid_len;
++      int count;
+       /*
+        * the edid data comes from user side and it would be set
+@@ -321,7 +322,11 @@ static int vidi_get_modes(struct drm_con
+       drm_connector_update_edid_property(connector, edid);
+-      return drm_add_edid_modes(connector, edid);
++      count = drm_add_edid_modes(connector, edid);
++
++      kfree(edid);
++
++      return count;
+ }
+ static const struct drm_connector_helper_funcs vidi_connector_helper_funcs = {
index ffba8f795c3a70e37caeb4dbe83503459ec3b69d..764f3a9b2e1e0b5d181cc6d1d9c059aba2096171 100644 (file)
@@ -48,3 +48,4 @@ netfilter-use-flowlabel-flow-key-when-re-routing-man.patch
 ipv6-route-add-a-missing-check-on-proc_dointvec.patch
 net-ipv6-fix-the-rt-cache-flush-via-sysctl-using-a-p.patch
 drivers-core-synchronize-really_probe-and-dev_uevent.patch
+drm-exynos-vidi-fix-memory-leak-in-.get_modes.patch