Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/xe: unlock object in an error condition
@ 2024-11-28 21:34 Oak Zeng
  2024-11-28 22:48 ` ✓ CI.Patch_applied: success for " Patchwork
                   ` (8 more replies)
  0 siblings, 9 replies; 11+ messages in thread
From: Oak Zeng @ 2024-11-28 21:34 UTC (permalink / raw)
  To: intel-xe; +Cc: Thomas.Hellstrom

In xe_gem_fault, we reserved a buffer object but didn't unreserve
it under an error condition. Unreserve it.

Signed-off-by: Oak Zeng <oak.zeng@intel.com>
---
 drivers/gpu/drm/xe/xe_bo.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/xe/xe_bo.c b/drivers/gpu/drm/xe/xe_bo.c
index f51d86511cb9e..634a1b54ca60d 100644
--- a/drivers/gpu/drm/xe/xe_bo.c
+++ b/drivers/gpu/drm/xe/xe_bo.c
@@ -1286,7 +1286,7 @@ static vm_fault_t xe_gem_fault(struct vm_fault *vmf)
 	}
 
 	if (ret == VM_FAULT_RETRY && !(vmf->flags & FAULT_FLAG_RETRY_NOWAIT))
-		goto out;
+		goto unlock;
 	/*
 	 * ttm_bo_vm_reserve() already has dma_resv_lock.
 	 */
@@ -1297,6 +1297,7 @@ static vm_fault_t xe_gem_fault(struct vm_fault *vmf)
 		mutex_unlock(&xe->mem_access.vram_userfault.lock);
 	}
 
+unlock:
 	dma_resv_unlock(tbo->base.resv);
 out:
 	if (needs_rpm)
-- 
2.26.3


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

end of thread, other threads:[~2024-11-29 16:05 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-28 21:34 [PATCH] drm/xe: unlock object in an error condition Oak Zeng
2024-11-28 22:48 ` ✓ CI.Patch_applied: success for " Patchwork
2024-11-28 22:48 ` ✓ CI.checkpatch: " Patchwork
2024-11-28 22:49 ` ✓ CI.KUnit: " Patchwork
2024-11-28 23:07 ` ✓ CI.Build: " Patchwork
2024-11-28 23:09 ` ✓ CI.Hooks: " Patchwork
2024-11-28 23:11 ` ✓ CI.checksparse: " Patchwork
2024-11-28 23:34 ` ✗ Xe.CI.BAT: failure " Patchwork
2024-11-29  8:37 ` [PATCH] " Thomas Hellström
2024-11-29 16:05   ` Zeng, Oak
2024-11-29 12:47 ` ✗ Xe.CI.Full: failure for " Patchwork

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