]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
drm/v3d: Protect per-fd reset counter against fd release
authorMaíra Canal <mcanal@igalia.com>
Tue, 26 Aug 2025 14:19:03 +0000 (11:19 -0300)
committerMaíra Canal <mcanal@igalia.com>
Fri, 29 Aug 2025 13:28:11 +0000 (10:28 -0300)
commit7d9bc9bee2778e2da7147aeb3a81427487598493
treedb5bc2693dec2e7e043276f8feae7252c61cda5f
parent78fe02d090d38393cc00de9d1929e59426f202a4
drm/v3d: Protect per-fd reset counter against fd release

The per-fd reset counter tracks GPU resets caused by jobs submitted
through a specific file descriptor. However, there's a race condition
where the file descriptor can be closed while jobs are still running,
leading to potential access to freed memory when updating the reset
counter.

Ensure that the per-fd reset counter is only updated when the file
descriptor is still valid, preventing use-after-free scenarios during
GPU reset handling.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Link: https://lore.kernel.org/r/20250826-v3d-queue-lock-v3-6-979efc43e490@igalia.com
Signed-off-by: Maíra Canal <mcanal@igalia.com>
drivers/gpu/drm/v3d/v3d_sched.c