From: Matthew Auld <matthew.auld@intel.com>
To: intel-xe@lists.freedesktop.org
Cc: Sashiko <sashiko-bot@kernel.org>,
Alan Previn <alan.previn.teres.alexis@intel.com>,
Tejas Upadhyay <tejas.upadhyay@intel.com>
Subject: [PATCH] drm/xe/madvise: use already clamped pat_index
Date: Thu, 15 Oct 2026 11:34:16 +0100 [thread overview]
Message-ID: <20261015103415.442931-2-matthew.auld@intel.com> (raw)
Pass the nospec-clamped pat_index to check_pat_args_are_sane() instead
of the raw args->pat_index.val, and fold into the preceding
DRM_XE_MEM_RANGE_ATTR_PAT block.
Assisted-by: LLM
Reported-by: Sashiko <sashiko-bot@kernel.org>
Closes: https://sashiko.dev/#/message/sashiko-outbox-172627%40kernel.org
Signed-off-by: Matthew Auld <matthew.auld@intel.com>
Cc: Alan Previn <alan.previn.teres.alexis@intel.com>
Cc: Tejas Upadhyay <tejas.upadhyay@intel.com>
---
drivers/gpu/drm/xe/xe_vm_madvise.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/xe/xe_vm_madvise.c b/drivers/gpu/drm/xe/xe_vm_madvise.c
index 5c7aefc641ee..a835cc55658f 100644
--- a/drivers/gpu/drm/xe/xe_vm_madvise.c
+++ b/drivers/gpu/drm/xe/xe_vm_madvise.c
@@ -659,11 +659,8 @@ int xe_vm_madvise_ioctl(struct drm_device *dev, void *data, struct drm_file *fil
err = -EINVAL;
goto free_vmas;
}
- }
- if (args->type == DRM_XE_MEM_RANGE_ATTR_PAT) {
- if (!check_pat_args_are_sane(xe, &madvise_range,
- args->pat_index.val)) {
+ if (!check_pat_args_are_sane(xe, &madvise_range, pat_index)) {
err = -EINVAL;
goto free_vmas;
}
--
2.56.0
next reply other threads:[~2026-10-15 10:34 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-15 10:34 Matthew Auld [this message]
2026-10-15 10:44 ` ✓ CI.KUnit: success for drm/xe/madvise: use already clamped pat_index Patchwork
2026-10-15 13:36 ` [PATCH] " Matthew Brost
2026-10-15 16:48 ` Upadhyay, Tejas
2026-10-15 17:45 ` ✓ Xe.CI.BAT: success for " Patchwork
2026-10-15 23:51 ` ✗ 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=20261015103415.442931-2-matthew.auld@intel.com \
--to=matthew.auld@intel.com \
--cc=alan.previn.teres.alexis@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=sashiko-bot@kernel.org \
--cc=tejas.upadhyay@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.