public inbox for kernel-janitors@vger.kernel.org
 help / color / mirror / Atom feed
From: Rodrigo Vivi <rodrigo.vivi@intel.com>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: David Airlie <airlied@linux.ie>,
	intel-gfx@lists.freedesktop.org, kernel-janitors@vger.kernel.org,
	intel-gvt-dev@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915/gvt: Off by one in intel_vgpu_write_fence()
Date: Tue, 07 Aug 2018 14:26:46 +0000	[thread overview]
Message-ID: <20180807142646.GA2210@intel.com> (raw)
In-Reply-To: <20180807064602.sagf25ettlvfpidm@kili.mountain>

On Tue, Aug 07, 2018 at 09:46:02AM +0300, Dan Carpenter wrote:
> The > should be >= here so that we don't read one element beyond the
> end of the array.
> 
> Fixes: 28a60dee2ce6 ("drm/i915/gvt: vGPU HW resource management")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>

> 
> diff --git a/drivers/gpu/drm/i915/gvt/aperture_gm.c b/drivers/gpu/drm/i915/gvt/aperture_gm.c
> index 380eeb2a0e83..fe754022e356 100644
> --- a/drivers/gpu/drm/i915/gvt/aperture_gm.c
> +++ b/drivers/gpu/drm/i915/gvt/aperture_gm.c
> @@ -131,7 +131,7 @@ void intel_vgpu_write_fence(struct intel_vgpu *vgpu,
>  
>  	assert_rpm_wakelock_held(dev_priv);
>  
> -	if (WARN_ON(fence > vgpu_fence_sz(vgpu)))
> +	if (WARN_ON(fence >= vgpu_fence_sz(vgpu)))
>  		return;
>  
>  	reg = vgpu->fence.regs[fence];

      reply	other threads:[~2018-08-07 14:26 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20180807023944.GZ22630@zhen-hp.sh.intel.com>
2018-08-07  6:46 ` [PATCH] drm/i915/gvt: Off by one in intel_vgpu_write_fence() Dan Carpenter
2018-08-07 14:26   ` Rodrigo Vivi [this message]

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=20180807142646.GA2210@intel.com \
    --to=rodrigo.vivi@intel.com \
    --cc=airlied@linux.ie \
    --cc=dan.carpenter@oracle.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=intel-gvt-dev@lists.freedesktop.org \
    --cc=kernel-janitors@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