From: Matthew Auld <matthew.auld@intel.com>
To: intel-xe@lists.freedesktop.org
Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>,
Matthew Brost <matthew.brost@intel.com>,
stable@vger.kernel.org
Subject: [PATCH] drm/xe/guc_submit: add back fix
Date: Tue, 3 Jun 2025 18:42:14 +0100 [thread overview]
Message-ID: <20250603174213.1543579-2-matthew.auld@intel.com> (raw)
Daniele noticed that the fix in commit 2d2be279f1ca ("drm/xe: fix UAF
around queue destruction") looks to have been unintentionally removed as
part of handling a conflict in some past merge commit. Add it back.
Fixes: ac44ff7cec33 ("Merge tag 'drm-xe-fixes-2024-10-10' of https://gitlab.freedesktop.org/drm/xe/kernel into drm-fixes")
Reported-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Signed-off-by: Matthew Auld <matthew.auld@intel.com>
Cc: Matthew Brost <matthew.brost@intel.com>
Cc: <stable@vger.kernel.org> # v6.12+
---
drivers/gpu/drm/xe/xe_guc_submit.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/drivers/gpu/drm/xe/xe_guc_submit.c b/drivers/gpu/drm/xe/xe_guc_submit.c
index 80f748baad3f..2b61d017eeca 100644
--- a/drivers/gpu/drm/xe/xe_guc_submit.c
+++ b/drivers/gpu/drm/xe/xe_guc_submit.c
@@ -229,6 +229,17 @@ static bool exec_queue_killed_or_banned_or_wedged(struct xe_exec_queue *q)
static void guc_submit_fini(struct drm_device *drm, void *arg)
{
struct xe_guc *guc = arg;
+ struct xe_device *xe = guc_to_xe(guc);
+ struct xe_gt *gt = guc_to_gt(guc);
+ int ret;
+
+ ret = wait_event_timeout(guc->submission_state.fini_wq,
+ xa_empty(&guc->submission_state.exec_queue_lookup),
+ HZ * 5);
+
+ drain_workqueue(xe->destroy_wq);
+
+ xe_gt_assert(gt, ret);
xa_destroy(&guc->submission_state.exec_queue_lookup);
}
--
2.49.0
next reply other threads:[~2025-06-03 17:44 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-03 17:42 Matthew Auld [this message]
2025-06-03 17:49 ` ✓ CI.Patch_applied: success for drm/xe/guc_submit: add back fix Patchwork
2025-06-03 17:49 ` ✗ CI.checkpatch: warning " Patchwork
2025-06-03 17:50 ` ✗ CI.KUnit: failure " Patchwork
2025-06-03 18:10 ` [PATCH] " Matthew Brost
2025-06-04 8:53 ` ✓ CI.Patch_applied: success for drm/xe/guc_submit: add back fix (rev2) Patchwork
2025-06-04 8:54 ` ✗ CI.checkpatch: warning " Patchwork
2025-06-04 8:55 ` ✓ CI.KUnit: success " Patchwork
2025-06-04 9:06 ` ✓ CI.Build: " Patchwork
2025-06-04 9:08 ` ✓ CI.Hooks: " Patchwork
2025-06-04 9:09 ` ✓ CI.checksparse: " Patchwork
2025-06-04 10:08 ` ✓ Xe.CI.BAT: " Patchwork
2025-06-05 2:53 ` ✗ Xe.CI.Full: failure " 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=20250603174213.1543579-2-matthew.auld@intel.com \
--to=matthew.auld@intel.com \
--cc=daniele.ceraolospurio@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=matthew.brost@intel.com \
--cc=stable@vger.kernel.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