RE: [net-next 14/14] i40e: always print aqtx answer

Nelson, Shannon
2014-07-24T20:13:54Z

> From: Joe Perches [mailto:joe@perches.com]
> Sent: Thursday, July 24, 2014 12:56 PM
>
> On Thu, 2014-07-24 at 19:20 +0000, Nelson, Shannon wrote:
> > > From: Joe Perches [mailto:joe@perches.com]
> > > Sent: Thursday, July 24, 2014 11:43 AM
> > >
> > > On Thu, 2014-07-24 at 06:13 -0700, Jeff Kirsher wrote:
> > > > From: Shannon Nelson <shannon.nelson@intel.com>
> > > >
> > > > Sometimes the AQTX answer comes back with no data, but we still
> want
> > > to print
> > > > the descriptor that got written back.
> > >
> > > Maybe this does some reads from buffer beyond its size
> > > in i40e_debug_aq? Is that always safe?
> >
> > This is safe because we'll only print the descriptor in this case,
> not the buffer. There's a check in i40e_debug_aq() for NULL or zero-
> length buffer.
>
> The question is not for descriptor length 0 or null,
> but bad descriptor length.
>

We defined and allocated the descriptors in the AQ descriptor struct ring and we know they won't change size. Or am I missing something?

sln