]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
drm/etnaviv: Protect the scheduler's pending list with its lock
authorMaíra Canal <mcanal@igalia.com>
Mon, 2 Jun 2025 13:22:16 +0000 (10:22 -0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 6 Jul 2025 08:58:02 +0000 (10:58 +0200)
commitf503efe2c5da084dc5ee2db38409f7a7e4f1bc1e
treee595105cac15d22ec8de71574c9ae2d87b42107f
parentf1064b3532192e987ab17be7281d5fee36fd25e1
drm/etnaviv: Protect the scheduler's pending list with its lock

commit 61ee19dedb8d753249e20308782bf4e9e2fb7344 upstream.

Commit 704d3d60fec4 ("drm/etnaviv: don't block scheduler when GPU is still
active") ensured that active jobs are returned to the pending list when
extending the timeout. However, it didn't use the pending list's lock to
manipulate the list, which causes a race condition as the scheduler's
workqueues are running.

Hold the lock while manipulating the scheduler's pending list to prevent
a race.

Cc: stable@vger.kernel.org
Fixes: 704d3d60fec4 ("drm/etnaviv: don't block scheduler when GPU is still active")
Reported-by: Philipp Stanner <phasta@kernel.org>
Closes: https://lore.kernel.org/dri-devel/964e59ba1539083ef29b06d3c78f5e2e9b138ab8.camel@mailbox.org/
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Philipp Stanner <phasta@kernel.org>
Link: https://lore.kernel.org/r/20250602132240.93314-1-mcanal@igalia.com
Signed-off-by: Maíra Canal <mcanal@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/etnaviv/etnaviv_sched.c