]> www.infradead.org Git - users/willy/xarray.git/commit
drm/xe: Drop HW fence pointer to HW fence ctx
authorMatthew Brost <matthew.brost@intel.com>
Thu, 15 Aug 2024 19:35:22 +0000 (12:35 -0700)
committerMatthew Brost <matthew.brost@intel.com>
Tue, 20 Aug 2024 20:06:00 +0000 (13:06 -0700)
commit60db6f540af9f93144d5039140aa2ed17171d168
treeb21722367eca3d6db28c853058d542cebab76fe2
parentdf2dbc925fad3274b952b865f85d26d1e056c1cc
drm/xe: Drop HW fence pointer to HW fence ctx

The HW fence ctx objects are not ref counted rather tied to the life of
an LRC object. HW fences reference the HW fence ctx, HW fences can
outlive LRCs thus resulting in UAF. Drop the  HW fence pointer to HW
fence ctx rather just store what is needed directly in HW fence.

v2:
 - Fix typo in commit (Ashutosh)
 - Use snprintf (Ashutosh)

Fixes: dd08ebf6c352 ("drm/xe: Introduce a new DRM driver for Intel GPUs")
Signed-off-by: Matthew Brost <matthew.brost@intel.com>
Reviewed-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240815193522.16008-1-matthew.brost@intel.com
drivers/gpu/drm/xe/xe_hw_fence.c
drivers/gpu/drm/xe/xe_hw_fence_types.h
drivers/gpu/drm/xe/xe_trace.h