]> www.infradead.org Git - users/jedix/linux-maple.git/commit
drm/panthor: Replace sleep locks with spinlocks in fdinfo path
authorAdrián Larumbe <adrian.larumbe@collabora.com>
Mon, 3 Mar 2025 19:08:45 +0000 (19:08 +0000)
committerSteven Price <steven.price@arm.com>
Wed, 5 Mar 2025 14:03:56 +0000 (14:03 +0000)
commite379856b428acafb8ed689f31d65814da6447b2e
tree08b53d3f767362a35095a2e337aff1460eda952e
parente4c0fd3f965533cd2b38200ca73625afd602d39b
drm/panthor: Replace sleep locks with spinlocks in fdinfo path

Commit 0590c94c3596 ("drm/panthor: Fix race condition when gathering fdinfo
group samples") introduced an xarray lock to deal with potential
use-after-free errors when accessing groups fdinfo figures. However, this
toggles the kernel's atomic context status, so the next nested mutex lock
will raise a warning when the kernel is compiled with mutex debug options:

CONFIG_DEBUG_RT_MUTEXES=y
CONFIG_DEBUG_MUTEXES=y

Replace Panthor's group fdinfo data mutex with a guarded spinlock.

Signed-off-by: Adrián Larumbe <adrian.larumbe@collabora.com>
Fixes: 0590c94c3596 ("drm/panthor: Fix race condition when gathering fdinfo group samples")
Reviewed-by: Liviu Dudau <liviu.dudau@arm.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Steven Price <steven.price@arm.com>
Signed-off-by: Steven Price <steven.price@arm.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250303190923.1639985-1-adrian.larumbe@collabora.com
drivers/gpu/drm/panthor/panthor_sched.c