From: Mario Limonciello <mario.limonciello@amd.com>
To: WenTao Liang <vulab@iscas.ac.cn>,
harry.wentland@amd.com, sunpeng.li@amd.com,
alexander.deucher@amd.com, christian.koenig@amd.com,
airlied@gmail.com, simona@ffwll.ch
Cc: siqueira@igalia.com, alex.hung@amd.com, superm1@kernel.org,
timur.kristof@gmail.com, ivan.lipski@amd.com,
aurabindo.pillai@amd.com, chen-yu.chen@amd.com,
amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
linux-kernel@vger.kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH] fix: drm/amd/display: dm_update_crtc_state: skip_modeset path leaves new_stream dangling, causing double release
Date: Fri, 26 Jun 2026 11:45:23 -0500 [thread overview]
Message-ID: <35dee3d1-f114-4eda-8185-244bc429c021@amd.com> (raw)
In-Reply-To: <20260626124128.36625-1-vulab@iscas.ac.cn>
On 6/26/26 07:41, WenTao Liang wrote:
> The skip_modeset path calls dc_stream_release(new_stream) but does not
> set new_stream to NULL. If a subsequent error (e.g., color management
> failure) triggers goto fail, the fail label executes a second
> dc_stream_release on the same pointer, causing a use-after-free or excess
> put on the stream reference.
>
> Cc: stable@vger.kernel.org
> Fixes: 3ce51649cdf2 ("drm/amdgpu/display: add quirk handling for stutter mode")
> Signed-off-by: WenTao Liang <vulab@iscas.ac.cn>
The code change looks good to me, but this Fixes hash doesn't really
make sense to me.
Are you sure about that?
I /think/ this is the correct hash:
Fixes: 9b690ef3c7042 ("drm/amd/display: Avoid full modeset when not
required")
> ---
> drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> index 5fc5d5608506..acf0b01d6f62 100644
> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> @@ -11708,6 +11708,7 @@ static int dm_update_crtc_state(struct amdgpu_display_manager *dm,
> /* Release extra reference */
> if (new_stream)
> dc_stream_release(new_stream);
> + new_stream = NULL;
>
> /*
> * We want to do dc stream updates that do not require a
next prev parent reply other threads:[~2026-06-26 16:45 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-26 12:41 WenTao Liang
2026-06-26 16:45 ` Mario Limonciello [this message]
2026-06-27 11:54 ` WenTao Liang
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=35dee3d1-f114-4eda-8185-244bc429c021@amd.com \
--to=mario.limonciello@amd.com \
--cc=airlied@gmail.com \
--cc=alex.hung@amd.com \
--cc=alexander.deucher@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=aurabindo.pillai@amd.com \
--cc=chen-yu.chen@amd.com \
--cc=christian.koenig@amd.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=harry.wentland@amd.com \
--cc=ivan.lipski@amd.com \
--cc=linux-kernel@vger.kernel.org \
--cc=simona@ffwll.ch \
--cc=siqueira@igalia.com \
--cc=stable@vger.kernel.org \
--cc=sunpeng.li@amd.com \
--cc=superm1@kernel.org \
--cc=timur.kristof@gmail.com \
--cc=vulab@iscas.ac.cn \
/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
all inboxes | Powered by JetHome®