Re: [PATCH] drm/nouveau: Fix race in nouveau_sched_fini()

From: Philipp Stanner
Date: Mon Oct 27 2025 - 09:15:18 EST


On Fri, 2025-10-24 at 18:17 +0200, Danilo Krummrich wrote:
> On 10/24/25 6:12 PM, Philipp Stanner wrote:
> > 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@xxxxxxxxxxxxxxx # v6.8+
> > Fixes: 5f03a507b29e ("drm/nouveau: implement 1:1 scheduler - entity relationship")
> > Signed-off-by: Philipp Stanner <phasta@xxxxxxxxxx>
>
> Acked-by: Danilo Krummrich <dakr@xxxxxxxxxx>

Applied to drm-misc-fixes


P.