From 551c918d5b7d4eda74c1a37994c7698aa31ddd5d Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Mon, 24 Nov 2025 14:58:00 +0100 Subject: [PATCH] 5.10-stable patches added patches: drm-tegra-dc-fix-reference-leak-in-tegra_dc_couple.patch --- ...ix-reference-leak-in-tegra_dc_couple.patch | 37 +++++++++++++++++++ queue-5.10/series | 1 + 2 files changed, 38 insertions(+) create mode 100644 queue-5.10/drm-tegra-dc-fix-reference-leak-in-tegra_dc_couple.patch diff --git a/queue-5.10/drm-tegra-dc-fix-reference-leak-in-tegra_dc_couple.patch b/queue-5.10/drm-tegra-dc-fix-reference-leak-in-tegra_dc_couple.patch new file mode 100644 index 0000000000..3b8f145615 --- /dev/null +++ b/queue-5.10/drm-tegra-dc-fix-reference-leak-in-tegra_dc_couple.patch @@ -0,0 +1,37 @@ +From 4c5376b4b143c4834ebd392aef2215847752b16a Mon Sep 17 00:00:00 2001 +From: Ma Ke +Date: Wed, 22 Oct 2025 19:47:20 +0800 +Subject: drm/tegra: dc: Fix reference leak in tegra_dc_couple() + +From: Ma Ke + +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 +Acked-by: Mikko Perttunen +Signed-off-by: Thierry Reding +Link: https://patch.msgid.link/20251022114720.24937-1-make24@iscas.ac.cn +Signed-off-by: Greg Kroah-Hartman +--- + 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 +@@ -2524,6 +2524,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; diff --git a/queue-5.10/series b/queue-5.10/series index 694de46b30..bb2a3d7d90 100644 --- a/queue-5.10/series +++ b/queue-5.10/series @@ -223,3 +223,4 @@ nvme-nvme-fc-ensure-ioerr_work-is-cancelled-in-nvme_fc_delete_ctrl.patch 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 +drm-tegra-dc-fix-reference-leak-in-tegra_dc_couple.patch -- 2.47.3