All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matt Roper <matthew.d.roper@intel.com>
To: Daniel Stone <daniels@collabora.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH i-g-t] kms_atomic: drop unnecessary connector looping from plane_primary test
Date: Fri, 26 Feb 2016 09:21:32 -0800	[thread overview]
Message-ID: <20160226172132.GC20607@intel.com> (raw)
In-Reply-To: <1456506021.14845.2.camel@collabora.com>

On Fri, Feb 26, 2016 at 05:00:21PM +0000, Daniel Stone wrote:
> Hi,
> 
> On Fri, 2016-02-26 at 08:58 -0800, Matt Roper wrote:
> > Local variable num_connectors is never initialized before being
> > auto-incremented in the loop.  If we wind up with a non-zero garbage
> > value, it will lead us to try to write to an out-of-bounds array
> > index.
> > We should probably initialize it to zero before use.
> > 
> > However on closer inspection, the plane_primary test doesn't actually
> > wind up using the connector list or number of connectors, so just
> > remove
> > the whole block of code; it was probably brought in by accident as
> > part
> > of a copy-paste operation.
> 
> History rather than copy & paste; originally crtc_commit_*() was
> inlined. But the rest of your analysis is totally correct; thanks for
> finding this!
> 
> Reviewed-by: Daniel Stone <daniels@collabora.com>

Thanks for the speedy review!  Pushed to fdo.


Matt

-- 
Matt Roper
Graphics Software Engineer
IoTG Platform Enabling & Development
Intel Corporation
(916) 356-2795
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

      reply	other threads:[~2016-02-26 17:21 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-26 16:58 [PATCH i-g-t] kms_atomic: drop unnecessary connector looping from plane_primary test Matt Roper
2016-02-26 17:00 ` Daniel Stone
2016-02-26 17:21   ` Matt Roper [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=20160226172132.GC20607@intel.com \
    --to=matthew.d.roper@intel.com \
    --cc=daniels@collabora.com \
    --cc=intel-gfx@lists.freedesktop.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 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.