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

Joe Perches
2014-07-24T19:56:05Z

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.