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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxx>

Cheers,
Daniel
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux