Commit e0023c8a authored by Philipp Stanner's avatar Philipp Stanner
Browse files

drm/nouveau: Fix race in nouveau_sched_fini()



nouveau_sched_fini() uses a memory barrier before wait_event().
wait_event(), however, is a macro which expands to a loop which might
check the passed condition several times. The barrier would only take
effect for the first check.

Replace the barrier with a function which takes the spinlock.

Cc: stable@vger.kernel.org # v6.8+
Fixes: 5f03a507 ("drm/nouveau: implement 1:1 scheduler - entity relationship")
Acked-by: default avatarDanilo Krummrich <dakr@kernel.org>
Signed-off-by: default avatarPhilipp Stanner <phasta@kernel.org>
Link: https://patch.msgid.link/20251024161221.196155-2-phasta@kernel.org
parent d25e3a61
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment