]> www.infradead.org Git - users/jedix/linux-maple.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)
committerMaíra Canal <mcanal@igalia.com>
Mon, 16 Jun 2025 23:18:13 +0000 (20:18 -0300)
commit61ee19dedb8d753249e20308782bf4e9e2fb7344
treed0d62290c0990365c5c7ba57652eeb6555a2642c
parente1bc3a13bd775791cca0bb144d977b00f3598042
drm/etnaviv: Protect the scheduler's pending list with its lock

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>
drivers/gpu/drm/etnaviv/etnaviv_sched.c