Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Matthew Auld <matthew.auld@intel.com>
To: intel-xe@lists.freedesktop.org
Cc: Matthew Brost <matthew.brost@intel.com>,
	Badal Nilawar <badal.nilawar@intel.com>
Subject: [PATCH v2 4/4] drm/xe/ct: drop irq usage of xa_erase()
Date: Tue,  1 Oct 2024 09:43:50 +0100	[thread overview]
Message-ID: <20241001084346.98516-8-matthew.auld@intel.com> (raw)
In-Reply-To: <20241001084346.98516-5-matthew.auld@intel.com>

Unclear why disabling interrupts is needed here. Nothing seems to be
touching fence_lookup and its corresponding lock from an irq so there
should be no risk of deadlock.

Signed-off-by: Matthew Auld <matthew.auld@intel.com>
Cc: Matthew Brost <matthew.brost@intel.com>
Cc: Badal Nilawar <badal.nilawar@intel.com>
---
 drivers/gpu/drm/xe/xe_guc_ct.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/xe/xe_guc_ct.c b/drivers/gpu/drm/xe/xe_guc_ct.c
index d3de2e6d690f..3fd1d4e97528 100644
--- a/drivers/gpu/drm/xe/xe_guc_ct.c
+++ b/drivers/gpu/drm/xe/xe_guc_ct.c
@@ -890,7 +890,7 @@ static int guc_ct_send_recv(struct xe_guc_ct *ct, const u32 *action, u32 len,
 			goto retry_same_fence;
 
 		if (!g2h_fence_needs_alloc(&g2h_fence))
-			xa_erase_irq(&ct->fence_lookup, g2h_fence.seqno);
+			xa_erase(&ct->fence_lookup, g2h_fence.seqno);
 
 		return ret;
 	}
@@ -907,7 +907,7 @@ static int guc_ct_send_recv(struct xe_guc_ct *ct, const u32 *action, u32 len,
 	if (!ret) {
 		xe_gt_err(gt, "Timed out wait for G2H, fence %u, action %04x, done %s",
 			  g2h_fence.seqno, action[0], str_yes_no(g2h_fence.done));
-		xa_erase_irq(&ct->fence_lookup, g2h_fence.seqno);
+		xa_erase(&ct->fence_lookup, g2h_fence.seqno);
 		mutex_unlock(&ct->lock);
 		return -ETIME;
 	}
-- 
2.46.2


  parent reply	other threads:[~2024-10-01  8:44 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-01  8:43 [PATCH v2 1/4] drm/xe/ct: prevent UAF in send_recv() Matthew Auld
2024-10-01  8:43 ` [PATCH v2 2/4] drm/xe/ct: fix xa_store() error checking Matthew Auld
2024-10-01 13:48   ` Nilawar, Badal
2024-10-01  8:43 ` [PATCH v2 3/4] drm/xe/guc_submit: " Matthew Auld
2024-10-01 13:50   ` Nilawar, Badal
2024-10-01  8:43 ` Matthew Auld [this message]
2024-10-01 14:55   ` [PATCH v2 4/4] drm/xe/ct: drop irq usage of xa_erase() Nilawar, Badal
2024-10-01  8:51 ` ✓ CI.Patch_applied: success for series starting with [v2,1/4] drm/xe/ct: prevent UAF in send_recv() Patchwork
2024-10-01  8:51 ` ✓ CI.checkpatch: " Patchwork
2024-10-01  8:52 ` ✓ CI.KUnit: " Patchwork
2024-10-01  9:09 ` ✓ CI.Build: " Patchwork
2024-10-01  9:12 ` ✓ CI.Hooks: " Patchwork
2024-10-01  9:14 ` ✓ CI.checksparse: " Patchwork
2024-10-01  9:40 ` ✓ CI.BAT: " Patchwork
2024-10-01 13:22 ` [PATCH v2 1/4] " Nilawar, Badal
2024-10-01 16:43 ` ✗ CI.FULL: failure for series starting with [v2,1/4] " 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=20241001084346.98516-8-matthew.auld@intel.com \
    --to=matthew.auld@intel.com \
    --cc=badal.nilawar@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=matthew.brost@intel.com \
    /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