From: Matthew Brost <matthew.brost@intel.com>
To: <intel-xe@lists.freedesktop.org>
Cc: Matthew Brost <matthew.brost@intel.com>
Subject: [PATCH] drm/xe: Fix loop in vm_bind_ioctl_ops_unwind
Date: Thu, 1 Feb 2024 09:55:32 -0800 [thread overview]
Message-ID: <20240201175532.2303168-1-matthew.brost@intel.com> (raw)
The logic for the unwind loop is incorrect resulting in an infinite
loop. Fix to unwind to go from the last operations list to he first.
Fixes: 617eebb9c480 ("drm/xe: Fix array of binds")
Signed-off-by: Matthew Brost <matthew.brost@intel.com>
---
drivers/gpu/drm/xe/xe_vm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/xe/xe_vm.c b/drivers/gpu/drm/xe/xe_vm.c
index 2ab863fe7d0a..3b145a9c70d5 100644
--- a/drivers/gpu/drm/xe/xe_vm.c
+++ b/drivers/gpu/drm/xe/xe_vm.c
@@ -2657,7 +2657,7 @@ static void vm_bind_ioctl_ops_unwind(struct xe_vm *vm,
{
int i;
- for (i = num_ops_list - 1; i; ++i) {
+ for (i = num_ops_list - 1; i >= 0; --i) {
struct drm_gpuva_ops *__ops = ops[i];
struct drm_gpuva_op *__op;
--
2.34.1
next reply other threads:[~2024-02-01 17:54 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-01 17:55 Matthew Brost [this message]
2024-02-01 19:07 ` ✓ CI.Patch_applied: success for drm/xe: Fix loop in vm_bind_ioctl_ops_unwind Patchwork
2024-02-01 19:07 ` ✗ CI.checkpatch: warning " Patchwork
2024-02-01 19:08 ` ✓ CI.KUnit: success " Patchwork
2024-02-01 19:16 ` ✓ CI.Build: " Patchwork
2024-02-01 19:16 ` ✓ CI.Hooks: " Patchwork
2024-02-01 19:17 ` ✓ CI.checksparse: " Patchwork
2024-02-01 19:20 ` [PATCH] " Maarten Lankhorst
2024-02-01 19:41 ` ✓ CI.BAT: success 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=20240201175532.2303168-1-matthew.brost@intel.com \
--to=matthew.brost@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