On Thu, 2025-11-13 at 15:51 +0100, Christian König wrote:
From: Matthew Brost matthew.brost@intel.com
Be safe when dereferencing fence->xe.
Signed-off-by: Matthew Brost matthew.brost@intel.com
drivers/gpu/drm/xe/xe_hw_fence.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/drivers/gpu/drm/xe/xe_hw_fence.c b/drivers/gpu/drm/xe/xe_hw_fence.c index f5fad4426729..8181dfc628e4 100644 --- a/drivers/gpu/drm/xe/xe_hw_fence.c +++ b/drivers/gpu/drm/xe/xe_hw_fence.c @@ -159,9 +159,7 @@ static struct xe_hw_fence_irq *xe_hw_fence_irq(struct xe_hw_fence *fence) static const char *xe_hw_fence_get_driver_name(struct dma_fence *dma_fence) {
- struct xe_hw_fence *fence = to_xe_hw_fence(dma_fence);
- return dev_name(fence->xe->drm.dev);
- return "xe";
}
May I ask what those name callbacks are used for in Xe? I had so far only seen those dma_fence callbacks being used in i915.
I'm asking because in Rust DmaFence I discovered that having those callbacks in the first place creates the life time problems Christian addresses in this series.
I think we had begun brainstorming whether removing get_driver_name() and get_timeline_name() in dma_fence's backend_ops would be the cleaner thing to do, compared to the RCU guards.
P.