]> 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)
committerRodrigo Vivi <rodrigo.vivi@intel.com>
Wed, 21 Aug 2024 15:53:12 +0000 (11:53 -0400)
commitdd3e840a33b57b92812fbec26273b3f0b4eb5ae3
tree51732d6e2aeb37546baeac760024c445b30ac137
parenta6f78359ac75f24cac3c1bdd753c49c1877bcd82
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
(cherry picked from commit 60db6f540af9f93144d5039140aa2ed17171d168)
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@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