All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Dixit, Ashutosh" <ashutosh.dixit@intel.com>
To: Riana Tauro <riana.tauro@intel.com>
Cc: anshuman.gupta@intel.com, intel-xe@lists.freedesktop.org,
	rodrigo.vivi@intel.com
Subject: Re: [Intel-xe] [PATCH] drm/xe: Fix overflow in vram manager
Date: Thu, 09 Mar 2023 08:51:22 -0800	[thread overview]
Message-ID: <87edpxna0l.wl-ashutosh.dixit@intel.com> (raw)
In-Reply-To: <20230309131856.1480173-1-riana.tauro@intel.com>

On Thu, 09 Mar 2023 05:18:56 -0800, Riana Tauro wrote:
>
> The overflow caused xe_bo_restore_kernel to return an error
> Fix overflow in vram manager alloc function.
>
> Signed-off-by: Riana Tauro <riana.tauro@intel.com>
> ---
>  drivers/gpu/drm/xe/xe_ttm_vram_mgr.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/xe/xe_ttm_vram_mgr.c b/drivers/gpu/drm/xe/xe_ttm_vram_mgr.c
> index 643365b18bc7..159ca7105df1 100644
> --- a/drivers/gpu/drm/xe/xe_ttm_vram_mgr.c
> +++ b/drivers/gpu/drm/xe/xe_ttm_vram_mgr.c
> @@ -118,7 +118,7 @@ static int xe_ttm_vram_mgr_new(struct ttm_resource_manager *man,
>
>		cur_size = size;
>
> -		if (fpfn + size != place->lpfn << PAGE_SHIFT) {
> +		if (fpfn + size != (u64)place->lpfn << PAGE_SHIFT) {

Looks ok but not sure if it should just be lpfn computed above? Copying Matt.

>			/*
>			 * Except for actual range allocation, modify the size and
>			 * min_block_size conforming to continuous flag enablement
> --
> 2.39.1
>

  reply	other threads:[~2023-03-09 16:51 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-09 13:18 [Intel-xe] [PATCH] drm/xe: Fix overflow in vram manager Riana Tauro
2023-03-09 16:51 ` Dixit, Ashutosh [this message]
2023-03-14  4:48   ` Riana Tauro
2023-03-14  8:27     ` Matthew Auld
2023-03-14  8:52       ` Matthew Auld
2023-03-14 10:03         ` Riana Tauro
2023-03-13 16:46 ` [Intel-xe] ✓ CI.Patch_applied: success for " Patchwork
2023-03-13 16:47 ` [Intel-xe] ✓ CI.KUnit: " Patchwork
2023-03-13 16:51 ` [Intel-xe] ✓ CI.Build: " 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=87edpxna0l.wl-ashutosh.dixit@intel.com \
    --to=ashutosh.dixit@intel.com \
    --cc=anshuman.gupta@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=riana.tauro@intel.com \
    --cc=rodrigo.vivi@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.