dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Nathan Chancellor" <nathan@kernel.org>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH] drm/amd/display: Shorten hdmi_frl_status_polling_workqueue
Date: Fri, 05 Jun 2026 01:25:47 +0000	[thread overview]
Message-ID: <20260605012547.9FCD01F00893@smtp.kernel.org> (raw)
In-Reply-To: <20260604-amdgpu-fix-wq_name_len-warning-v1-1-eb5415b45b27@kernel.org>

Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:

Pre-existing issues:
- [High] Resource leak of hdmi_frl_status_polling_wq during module teardown or initialization failure.
- [High] NULL pointer dereference if hdmi_frl_status_polling_wq allocation fails.
--

commit b8f83563decd99d69977bc64fe3e67736687cb49
Author: Nathan Chancellor <nathan@kernel.org>
drm/amd/display: Shorten hdmi_frl_status_polling_workqueue

This commit shortens the name of the hdmi_frl_status_polling_wq workqueue
to prevent warnings about exceeding the maximum workqueue name length.

Fixes: 5c9b8b27a883 ("drm/amd/display: Tie FRL support into amdgpu_dm")
Signed-off-by: Nathan Chancellor <nathan@kernel.org>

> 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 8f80420e9f0b8..3cde7a456858c 100644
> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> @@ -2259,9 +2259,9 @@ static int amdgpu_dm_init(struct amdgpu_device *adev)
>  	}
>  	if (adev->dm.dc->caps.max_links > 0) {
>  		adev->dm.hdmi_frl_status_polling_wq =
> -			create_singlethread_workqueue("hdmi_frl_status_polling_workqueue");
> +			create_singlethread_workqueue("hdmi_frl_status_polling_wq");

[Severity: High]
This isn't a bug introduced by this patch, but does this workqueue get
leaked on driver unload?

Looking at amdgpu_dm_fini(), there doesn't seem to be a corresponding
destroy_workqueue() call for this specific workqueue. Does this mean every
time the driver is unloaded or initialization fails after this point, the
workqueue struct and its internal resources are leaked?

>  		if (!adev->dm.hdmi_frl_status_polling_wq)
> -			drm_err(adev_to_drm(adev), "failed to initialize hdmi_frl_status_polling_workqueue\n");
> +			drm_err(adev_to_drm(adev), "failed to initialize hdmi_frl_status_polling_wq\n");

[Severity: High]
This is also a pre-existing issue, but can an allocation failure here
cause a NULL pointer dereference later on?

Unlike other workqueues in this function that use a goto error path when
allocation fails, this just logs the error and continues. If it returns
NULL, wouldn't amdgpu_dm_commit_streams() trigger a kernel panic when it
subsequently calls queue_delayed_work() using this NULL pointer?

>  		adev->dm.hdmi_frl_status_polling_delay_ms = 200;
>  		INIT_DELAYED_WORK(&adev->dm.hdmi_frl_status_polling_work, hdmi_frl_status_polling_work);
>  	}

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260604-amdgpu-fix-wq_name_len-warning-v1-1-eb5415b45b27@kernel.org?part=1

  reply	other threads:[~2026-06-05  1:25 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-05  1:13 [PATCH] drm/amd/display: Shorten hdmi_frl_status_polling_workqueue Nathan Chancellor
2026-06-05  1:25 ` sashiko-bot [this message]
2026-06-05 18:18 ` Alex Hung

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=20260605012547.9FCD01F00893@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=nathan@kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /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