From: Tvrtko Ursulin <tursulin@ursulin.net>
To: Candice Li <candice.li@amd.com>, dri-devel@lists.freedesktop.org
Cc: Alexander Deucher <alexander.deucher@amd.com>,
Christian Koenig <christian.koenig@amd.com>,
Hawking Zhang <Hawking.Zhang@amd.com>
Subject: Re: [PATCH] drm/sched: fix NULL deref when logging missing entity runqueue
Date: Wed, 3 Jun 2026 06:58:09 +0100 [thread overview]
Message-ID: <82e8aead-9782-4d2d-8fd9-7d0aed291e05@ursulin.net> (raw)
In-Reply-To: <20260603025636.1301481-1-candice.li@amd.com>
On 03/06/2026 03:56, Candice Li wrote:
> job->sched is not initialized until drm_sched_job_arm(), so use
> pr_err() instead of dev_err(job->sched->dev, ...) when entity->rq
> is NULL.
>
> Signed-off-by: Candice Li <candice.li@amd.com>
> ---
> drivers/gpu/drm/scheduler/sched_main.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/scheduler/sched_main.c b/drivers/gpu/drm/scheduler/sched_main.c
> index bd7936c03da2aa..d21eada76cedf1 100644
> --- a/drivers/gpu/drm/scheduler/sched_main.c
> +++ b/drivers/gpu/drm/scheduler/sched_main.c
> @@ -806,7 +806,7 @@ int drm_sched_job_init(struct drm_sched_job *job,
> * or worse--a blank screen--leave a trail in the
> * logs, so this can be debugged easier.
> */
> - dev_err(job->sched->dev, "%s: entity has no rq!\n", __func__);
> + pr_err("*ERROR* %s: entity has no rq!\n", __func__);
> return -ENOENT;
> }
>
Even better, entity->rq cannot be NULL:
https://lore.kernel.org/dri-devel/20260602153339.43453-1-tvrtko.ursulin@igalia.com/T/#u
Regards,
Tvrtko
next prev parent reply other threads:[~2026-06-03 5:58 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-03 2:56 [PATCH] drm/sched: fix NULL deref when logging missing entity runqueue Candice Li
2026-06-03 5:58 ` Tvrtko Ursulin [this message]
2026-06-03 7:00 ` Christian König
2026-06-03 7:06 ` Philipp Stanner
2026-06-03 7:10 ` Philipp Stanner
2026-06-04 1:58 ` Claude review: " Claude Code Review Bot
2026-06-04 1:58 ` Claude Code Review Bot
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=82e8aead-9782-4d2d-8fd9-7d0aed291e05@ursulin.net \
--to=tursulin@ursulin.net \
--cc=Hawking.Zhang@amd.com \
--cc=alexander.deucher@amd.com \
--cc=candice.li@amd.com \
--cc=christian.koenig@amd.com \
--cc=dri-devel@lists.freedesktop.org \
/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