mirror-linux/drivers/gpu/drm/v3d
Maíra Canal 7d9bc9bee2 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>
2025-08-29 10:28:11 -03:00
..
Kconfig
Makefile
v3d_bo.c mm: remove callers of pfn_t functionality 2025-07-09 22:42:19 -07:00
v3d_debugfs.c drm/v3d: Associate a V3D tech revision to all supported devices 2025-03-23 11:04:16 -03:00
v3d_drv.c drm/v3d: Address race-condition between per-fd GPU stats and fd release 2025-08-29 10:28:10 -03:00
v3d_drv.h drm/v3d: Address race-condition between per-fd GPU stats and fd release 2025-08-29 10:28:10 -03:00
v3d_fence.c drm/v3d: Replace a global spinlock with a per-queue spinlock 2025-08-29 10:28:10 -03:00
v3d_gem.c drm/v3d: Replace a global spinlock with a per-queue spinlock 2025-08-29 10:28:10 -03:00
v3d_gemfs.c sanitize handling of long-term internal mounts 2025-06-29 18:13:41 -04:00
v3d_irq.c drm/v3d: Replace a global spinlock with a per-queue spinlock 2025-08-29 10:28:10 -03:00
v3d_mmu.c drm/v3d: Fix miscellaneous documentation errors 2024-12-11 10:06:14 -03:00
v3d_perfmon.c drm/v3d: Associate a V3D tech revision to all supported devices 2025-03-23 11:04:16 -03:00
v3d_performance_counters.h drm/v3d: Fix miscellaneous documentation errors 2024-12-11 10:06:14 -03:00
v3d_regs.h drm/v3d: Use V3D_SMS registers for power on/off and reset on V3D 7.x 2025-03-23 11:06:15 -03:00
v3d_sched.c drm/v3d: Protect per-fd reset counter against fd release 2025-08-29 10:28:11 -03:00
v3d_submit.c drm/v3d: Store a pointer to `struct v3d_file_priv` inside each job 2025-08-29 10:28:10 -03:00
v3d_sysfs.c
v3d_trace.h
v3d_trace_points.c