[Intel-gfx] [PATCH 2/5] drm/i915: fix intel_dp_aux_native_read's reply array size

Damien Lespiau damien.lespiau at intel.com
Fri Sep 13 14:53:03 CEST 2013


On Fri, Sep 13, 2013 at 12:21:21PM +0300, Jani Nikula wrote:
> On Fri, 13 Sep 2013, Paulo Zanoni <przanoni at gmail.com> wrote:
> > From: Paulo Zanoni <paulo.r.zanoni at intel.com>
> >
> > So far we control all the reads an none of them exceeds the current
> > limit of 20 bytes, but we never think about this when reviewing
> > patches, so we may at some point in the future overflow the buffer.
> >
> > My initial patch just added a WARN in case we were about to overflow
> > the buffer, but Chris suggested to make the size of the array dynamic.
> 
> VLA on stack in kernel gives me an uneasy feeling, but I'll survive.

IIRC sparse will complain about this. Might worth double checking.

-- 
Damien



More information about the Intel-gfx mailing list