Files
linux-nf/drivers/gpu/drm/xe
Tvrtko Ursulin 6bd90e700b drm/xe: Make dma-fences compliant with the safe access rules
Xe can free some of the data pointed to by the dma-fences it exports. Most
notably the timeline name can get freed if userspace closes the associated
submit queue. At the same time the fence could have been exported to a
third party (for example a sync_fence fd) which will then cause an use-
after-free on subsequent access.

To make this safe we need to make the driver compliant with the newly
documented dma-fence rules. Driver has to ensure a RCU grace period
between signalling a fence and freeing any data pointed to by said fence.

For the timeline name we simply make the queue be freed via kfree_rcu and
for the shared lock associated with multiple queues we add a RCU grace
period before freeing the per GT structure holding the lock.

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@igalia.com>
Reviewed-by: Matthew Brost <matthew.brost@intel.com>
Acked-by: Lucas De Marchi <lucas.demarchi@intel.com>
Signed-off-by: Tvrtko Ursulin <tursulin@ursulin.net>
Link: https://lore.kernel.org/r/20250610164226.10817-5-tvrtko.ursulin@igalia.com
2025-06-13 08:28:22 +01:00
..
2025-04-10 14:09:35 -07:00
2025-01-09 17:58:09 +01:00
2025-01-09 17:58:09 +01:00
2025-01-09 17:58:09 +01:00
2025-04-28 17:42:49 +02:00
2025-03-25 20:51:29 -07:00
2025-01-14 07:02:49 -08:00
2024-11-15 15:59:51 -08:00
2025-03-25 20:51:29 -07:00
2025-01-21 22:01:28 +01:00
2024-09-19 10:15:40 +02:00
2025-04-02 16:25:28 -07:00
2025-01-27 08:54:06 -08:00
2025-02-03 11:51:26 -08:00
2025-01-19 00:12:02 +01:00
2025-01-09 17:58:09 +01:00
2025-01-17 00:01:58 +05:30
2025-06-05 18:05:19 +02:00
2025-04-10 15:50:01 -07:00
2024-12-09 09:59:47 -05:00
2024-12-03 15:02:55 -05:00
2024-07-24 09:05:37 -07:00