From: Mikko Perttunen <mperttunen@nvidia.com>
To: thierry.reding@gmail.com, airlied@gmail.com, simona@ffwll.ch,
jonathanh@nvidia.com, Ma Ke <make24@iscas.ac.cn>
Cc: dri-devel@lists.freedesktop.org, linux-tegra@vger.kernel.org,
linux-kernel@vger.kernel.org, akpm@linux-foundation.org,
Ma Ke <make24@iscas.ac.cn>,
stable@vger.kernel.org
Subject: Re: [PATCH RESEND] drm/tegra: dc: fix reference leak in tegra_dc_couple()
Date: Thu, 23 Oct 2025 13:32:56 +0900 [thread overview]
Message-ID: <2620730.K71DO8KEF6@senjougahara> (raw)
In-Reply-To: <20251022114720.24937-1-make24@iscas.ac.cn>
On Wednesday, October 22, 2025 8:47 PM Ma Ke wrote:
> 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>
> ---
> drivers/gpu/drm/tegra/dc.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/gpu/drm/tegra/dc.c b/drivers/gpu/drm/tegra/dc.c
> index 59d5c1ba145a..6c84bd69b11f 100644
> --- a/drivers/gpu/drm/tegra/dc.c
> +++ b/drivers/gpu/drm/tegra/dc.c
> @@ -3148,6 +3148,7 @@ static int tegra_dc_couple(struct tegra_dc *dc)
> dc->client.parent = &parent->client;
>
> dev_dbg(dc->dev, "coupled to %s\n", dev_name(companion));
> + put_device(companion);
> }
>
> return 0;
>
Acked-by: Mikko Perttunen <mperttunen@nvidia.com>
prev parent reply other threads:[~2025-10-23 4:33 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-22 11:47 [PATCH RESEND] drm/tegra: dc: fix reference leak in tegra_dc_couple() Ma Ke
2025-10-23 4:32 ` Mikko Perttunen [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2620730.K71DO8KEF6@senjougahara \
--to=mperttunen@nvidia.com \
--cc=airlied@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=jonathanh@nvidia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=make24@iscas.ac.cn \
--cc=simona@ffwll.ch \
--cc=stable@vger.kernel.org \
--cc=thierry.reding@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox