Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Nirmoy Das <nirmoy.das@intel.com>
To: Matthew Auld <matthew.auld@intel.com>, <intel-xe@lists.freedesktop.org>
Cc: <stable@vger.kernel.org>
Subject: Re: [PATCH] drm/xe/query: fix gt_id bounds check
Date: Thu, 21 Mar 2024 12:10:58 +0100	[thread overview]
Message-ID: <2ef68b2f-f227-443f-b863-d707ce6ff152@intel.com> (raw)
In-Reply-To: <20240321110629.334701-2-matthew.auld@intel.com>

[-- Attachment #1: Type: text/plain, Size: 955 bytes --]


On 3/21/2024 12:06 PM, Matthew Auld wrote:
> The user provided gt_id should always be less than the
> XE_MAX_GT_PER_TILE.
>
> Fixes: 7793d00d1bf5 ("drm/xe: Correlate engine and cpu timestamps with better accuracy")
> Signed-off-by: Matthew Auld<matthew.auld@intel.com>
> Cc: Nirmoy Das<nirmoy.das@intel.com>
> Cc:<stable@vger.kernel.org>  # v6.8+
Reviewed-by: Nirmoy Das <nirmoy.das@intel.com>
> ---
>   drivers/gpu/drm/xe/xe_query.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/xe/xe_query.c b/drivers/gpu/drm/xe/xe_query.c
> index fcd8680d2ccc..df407d73e5f5 100644
> --- a/drivers/gpu/drm/xe/xe_query.c
> +++ b/drivers/gpu/drm/xe/xe_query.c
> @@ -133,7 +133,7 @@ query_engine_cycles(struct xe_device *xe,
>   		return -EINVAL;
>   
>   	eci = &resp.eci;
> -	if (eci->gt_id > XE_MAX_GT_PER_TILE)
> +	if (eci->gt_id >= XE_MAX_GT_PER_TILE)
>   		return -EINVAL;
>   
>   	gt = xe_device_get_gt(xe, eci->gt_id);

[-- Attachment #2: Type: text/html, Size: 1809 bytes --]

  reply	other threads:[~2024-03-21 11:11 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-21 11:06 [PATCH] drm/xe/query: fix gt_id bounds check Matthew Auld
2024-03-21 11:10 ` Nirmoy Das [this message]
2024-03-21 11:20 ` Ghimiray, Himal Prasad
2024-03-21 12:06 ` ✓ CI.Patch_applied: success for " Patchwork
2024-03-21 12:06 ` ✓ CI.checkpatch: " Patchwork
2024-03-21 12:07 ` ✓ CI.KUnit: " Patchwork
2024-03-21 12:18 ` ✓ CI.Build: " Patchwork
2024-03-21 12:20 ` ✓ CI.Hooks: " Patchwork
2024-03-21 12:22 ` ✓ CI.checksparse: " Patchwork
2024-03-21 12:46 ` ✓ CI.BAT: " 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=2ef68b2f-f227-443f-b863-d707ce6ff152@intel.com \
    --to=nirmoy.das@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=matthew.auld@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