Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/xe: Drop trace_xe_hw_fence_free
@ 2024-07-08 21:10 Matthew Brost
  2024-07-08 21:22 ` ✓ CI.Patch_applied: success for " Patchwork
                   ` (8 more replies)
  0 siblings, 9 replies; 11+ messages in thread
From: Matthew Brost @ 2024-07-08 21:10 UTC (permalink / raw)
  To: intel-xe

fence->ctx may be stale memory when trace_xe_hw_fence_free is called
resuling UAF bug when deriving the device name. This tracepoint is not
all that useful, so just drop it.

Fixes: 501c4255c409 ("drm/xe/trace: Print device_id in xe_trace events")
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Lucas De Marchi <lucas.demarchi@intel.com>
Cc: Gustavo Sousa <gustavo.sousa@intel.com>
Cc: Radhakrishna Sripada <radhakrishna.sripada@intel.com>
Cc: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: Matthew Brost <matthew.brost@intel.com>
---
 drivers/gpu/drm/xe/xe_hw_fence.c | 1 -
 drivers/gpu/drm/xe/xe_trace.h    | 5 -----
 2 files changed, 6 deletions(-)

diff --git a/drivers/gpu/drm/xe/xe_hw_fence.c b/drivers/gpu/drm/xe/xe_hw_fence.c
index 35c0063a831a..45a9789cf501 100644
--- a/drivers/gpu/drm/xe/xe_hw_fence.c
+++ b/drivers/gpu/drm/xe/xe_hw_fence.c
@@ -187,7 +187,6 @@ static void xe_hw_fence_release(struct dma_fence *dma_fence)
 {
 	struct xe_hw_fence *fence = to_xe_hw_fence(dma_fence);
 
-	trace_xe_hw_fence_free(fence);
 	XE_WARN_ON(!list_empty(&fence->irq_link));
 	call_rcu(&dma_fence->rcu, fence_free);
 }
diff --git a/drivers/gpu/drm/xe/xe_trace.h b/drivers/gpu/drm/xe/xe_trace.h
index 09ca1ad057b0..baba14fb1e32 100644
--- a/drivers/gpu/drm/xe/xe_trace.h
+++ b/drivers/gpu/drm/xe/xe_trace.h
@@ -341,11 +341,6 @@ DEFINE_EVENT(xe_hw_fence, xe_hw_fence_try_signal,
 	     TP_ARGS(fence)
 );
 
-DEFINE_EVENT(xe_hw_fence, xe_hw_fence_free,
-	     TP_PROTO(struct xe_hw_fence *fence),
-	     TP_ARGS(fence)
-);
-
 TRACE_EVENT(xe_reg_rw,
 	TP_PROTO(struct xe_gt *gt, bool write, u32 reg, u64 val, int len),
 
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2024-07-09  2:43 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-08 21:10 [PATCH] drm/xe: Drop trace_xe_hw_fence_free Matthew Brost
2024-07-08 21:22 ` ✓ CI.Patch_applied: success for " Patchwork
2024-07-08 21:22 ` ✓ CI.checkpatch: " Patchwork
2024-07-08 21:23 ` ✓ CI.KUnit: " Patchwork
2024-07-08 21:34 ` [PATCH] " Rodrigo Vivi
2024-07-08 21:39   ` Matthew Brost
2024-07-08 21:35 ` ✓ CI.Build: success for " Patchwork
2024-07-08 21:37 ` ✓ CI.Hooks: " Patchwork
2024-07-08 21:39 ` ✓ CI.checksparse: " Patchwork
2024-07-08 22:04 ` ✓ CI.BAT: " Patchwork
2024-07-09  2:43 ` ✓ CI.FULL: " Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox