drm/i915: Protect access to driver and timeline name
authorTvrtko Ursulin <tvrtko.ursulin@igalia.com>
Tue, 10 Jun 2025 16:42:24 +0000 (17:42 +0100)
committerTvrtko Ursulin <tursulin@ursulin.net>
Fri, 13 Jun 2025 07:26:36 +0000 (08:26 +0100)
commit4d2f8bc628cefae7f397cfd19342fed67e0ae833
tree9ade1c64a465df1108355f2323027e5ef987ec7c
parentad10976d6cf092a3ea5128d0bc5ab9318f71875f
drm/i915: Protect access to driver and timeline name

Protect the access to driver and timeline name which otherwise could be
freed as dma-fence exported is signalling fences.

This prepares the code for incoming dma-fence API changes which will start
asserting these accesses are done from a RCU locked section.

Now that the safe access is handled in the dma-fence API, the external
callers such as sync_file, and our internal code paths, we can drop the
similar protection from i915_fence_get_timeline_name().

This prepares the code for incoming dma-fence API changes which will start
asserting these accesses are done from a RCU locked section.

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@igalia.com>
Reviewed-by: Andi Shyti <andi.shyti@linux.intel.com> # v1
Signed-off-by: Tvrtko Ursulin <tursulin@ursulin.net>
Link: https://lore.kernel.org/r/20250610164226.10817-3-tvrtko.ursulin@igalia.com
drivers/gpu/drm/i915/gt/intel_gt_requests.c
drivers/gpu/drm/i915/i915_request.c
drivers/gpu/drm/i915/i915_sw_fence.c