From: Oak Zeng <oak.zeng@intel.com>
To: intel-xe@lists.freedesktop.org
Cc: Thomas.Hellstrom@linux.intel.com
Subject: [PATCH] drm/xe: unlock object in an error condition
Date: Thu, 28 Nov 2024 16:34:08 -0500 [thread overview]
Message-ID: <20241128213408.1821171-1-oak.zeng@intel.com> (raw)
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
next reply other threads:[~2024-11-28 21:20 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-28 21:34 Oak Zeng [this message]
2024-11-28 22:48 ` ✓ CI.Patch_applied: success for drm/xe: unlock object in an error condition 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20241128213408.1821171-1-oak.zeng@intel.com \
--to=oak.zeng@intel.com \
--cc=Thomas.Hellstrom@linux.intel.com \
--cc=intel-xe@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox