From: Sidong Yang <sidong.yang@furiosa.ai>
To: Tvrtko Ursulin <tvrtko.ursulin@igalia.com>
Cc: amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
kernel-dev@igalia.com,
"Christian König" <christian.koenig@amd.com>,
"Alex Deucher" <alexander.deucher@amd.com>,
"Luben Tuikov" <ltuikov89@gmail.com>,
"Matthew Brost" <matthew.brost@intel.com>,
"Simona Vetter" <simona@ffwll.ch>,
"Danilo Krummrich" <dakr@kernel.org>,
"Philipp Stanner" <phasta@kernel.org>,
"Tomeu Vizoso" <tomeu@tomeuvizoso.net>
Subject: Re: [PATCH 4/7] drm/sched: Remove the single scheduler special case
Date: Sun, 8 Nov 2026 18:12:40 +0900 [thread overview]
Message-ID: <avA9ACE9ar1MEdtD@rock-5b-plus> (raw)
In-Reply-To: <20261106145702.61640-5-tvrtko.ursulin@igalia.com>
On Fri, Nov 06, 2026 at 02:56:59PM +0000, Tvrtko Ursulin wrote:
> @@ -139,7 +141,10 @@ int drm_sched_entity_init(struct drm_sched_entity *entity,
> entity->guilty = guilty;
> entity->last_user = current->group_leader;
> entity->num_sched_list = num_sched_list;
> - entity->sched_list = num_sched_list > 1 ? sched_list : NULL;
> + if (num_sched_list == 1)
> + entity->sched = sched_list[0];
> + else
> + entity->sched_list = sched_list;
This breaks rocket. rocket_job_open() passes a kmalloc'ed array of
rdev->num_cores schedulers, and rocket_job_close() does
kfree(entity->sched_list). With only one core bound when the file is
opened (e.g. the other cores probe later), the union now holds
&rdev->cores[0].sched, so close kfree()s a pointer into the devm
allocation. Before this patch it was kfree(NULL) (and the array leaked).
I can send a rocket fix that keeps its own pointer to the array and
frees that instead, so it can go in before this patch, unless you'd
rather carry it in this series.
Thanks,
Sidong
next prev parent reply other threads:[~2026-11-08 9:16 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-06 14:56 [PATCH 0/7] drm/sched: Replace SPSC queue with a list and spinlock Tvrtko Ursulin
2026-11-06 14:56 ` [PATCH 1/7] drm/sched: Disallow initializing entities with un-initialized schedulers Tvrtko Ursulin
2026-11-06 14:56 ` [PATCH 2/7] drm/sched: Ignore stopped entity attempt to change its run-queue Tvrtko Ursulin
2026-11-06 14:56 ` [PATCH 3/7] drm/sched: Replace completion with a flush Tvrtko Ursulin
2026-11-06 14:56 ` [PATCH 4/7] drm/sched: Remove the single scheduler special case Tvrtko Ursulin
2026-11-08 9:12 ` Sidong Yang [this message]
2026-11-09 1:49 ` Sidong Yang
2026-11-06 14:57 ` [PATCH 5/7] drm/amdgpu: Rework the amdgpu_job_stop_all_jobs_on_sched() hack Tvrtko Ursulin
2026-11-09 12:46 ` Philipp Stanner
2026-11-09 14:45 ` Tvrtko Ursulin
2026-11-09 14:54 ` Christian König
2026-11-06 14:57 ` [PATCH 6/7] drm/sched: Replace the SPSC queue with a list and a spinlock Tvrtko Ursulin
2026-11-10 15:49 ` Philipp Stanner
2026-11-12 12:59 ` Tvrtko Ursulin
2026-11-12 14:09 ` Philipp Stanner
2026-11-12 15:37 ` Tvrtko Ursulin
2026-11-06 14:57 ` [PATCH 7/7] drm/sched: Address the fence_seq fixme Tvrtko Ursulin
2026-11-09 10:21 ` [PATCH 0/7] drm/sched: Replace SPSC queue with a list and spinlock Philipp Stanner
2026-11-09 11:14 ` Tvrtko Ursulin
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=avA9ACE9ar1MEdtD@rock-5b-plus \
--to=sidong.yang@furiosa.ai \
--cc=alexander.deucher@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=christian.koenig@amd.com \
--cc=dakr@kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=kernel-dev@igalia.com \
--cc=ltuikov89@gmail.com \
--cc=matthew.brost@intel.com \
--cc=phasta@kernel.org \
--cc=simona@ffwll.ch \
--cc=tomeu@tomeuvizoso.net \
--cc=tvrtko.ursulin@igalia.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.