[Intel-gfx] [PATCH i-g-t] kms_atomic: drop unnecessary connector looping from plane_primary test

Matt Roper matthew.d.roper at intel.com
Fri Feb 26 17:21:32 UTC 2016


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 at 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


More information about the Intel-gfx mailing list