]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.15-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 24 Nov 2025 13:58:12 +0000 (14:58 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 24 Nov 2025 13:58:12 +0000 (14:58 +0100)
added patches:
drm-tegra-dc-fix-reference-leak-in-tegra_dc_couple.patch

queue-5.15/drm-tegra-dc-fix-reference-leak-in-tegra_dc_couple.patch [new file with mode: 0644]
queue-5.15/series

diff --git a/queue-5.15/drm-tegra-dc-fix-reference-leak-in-tegra_dc_couple.patch b/queue-5.15/drm-tegra-dc-fix-reference-leak-in-tegra_dc_couple.patch
new file mode 100644 (file)
index 0000000..5ffa420
--- /dev/null
@@ -0,0 +1,37 @@
+From 4c5376b4b143c4834ebd392aef2215847752b16a Mon Sep 17 00:00:00 2001
+From: Ma Ke <make24@iscas.ac.cn>
+Date: Wed, 22 Oct 2025 19:47:20 +0800
+Subject: drm/tegra: dc: Fix reference leak in tegra_dc_couple()
+
+From: Ma Ke <make24@iscas.ac.cn>
+
+commit 4c5376b4b143c4834ebd392aef2215847752b16a upstream.
+
+driver_find_device() calls get_device() to increment the reference
+count once a matching device is found, but there is no put_device() to
+balance the reference count. To avoid reference count leakage, add
+put_device() to decrease the reference count.
+
+Found by code review.
+
+Cc: stable@vger.kernel.org
+Fixes: a31500fe7055 ("drm/tegra: dc: Restore coupling of display controllers")
+Signed-off-by: Ma Ke <make24@iscas.ac.cn>
+Acked-by: Mikko Perttunen <mperttunen@nvidia.com>
+Signed-off-by: Thierry Reding <treding@nvidia.com>
+Link: https://patch.msgid.link/20251022114720.24937-1-make24@iscas.ac.cn
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/gpu/drm/tegra/dc.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/drivers/gpu/drm/tegra/dc.c
++++ b/drivers/gpu/drm/tegra/dc.c
+@@ -2982,6 +2982,7 @@ static int tegra_dc_couple(struct tegra_
+               dc->client.parent = &parent->client;
+               dev_dbg(dc->dev, "coupled to %s\n", dev_name(companion));
++              put_device(companion);
+       }
+       return 0;
index d02a30a46e619ae16c35af111a73ba861f661402..bd3c3964ad0b78f8574f0e525904c8d3e6ff402d 100644 (file)
@@ -291,3 +291,4 @@ scsi-sg-do-not-sleep-in-atomic-context.patch
 scsi-target-tcm_loop-fix-segfault-in-tcm_loop_tpg_address_show.patch
 mips-malta-fix-eva-soc-it-pci-mmio.patch
 mptcp-fix-race-condition-in-mptcp_schedule_work.patch
+drm-tegra-dc-fix-reference-leak-in-tegra_dc_couple.patch