Re: [net-next 15/16] igb: Fix Null-pointer dereference in igb_reset_q_vector

Jeff Kirsher
2014-03-24T20:49:34Z

[-- Attachment #1: Type: text/plain, Size: 1617 bytes --]

On Sun, 2014-03-23 at 15:31 +0100, Christoph Paasch wrote:
> On 21/03/14 - 12:10:05, Jeff Kirsher wrote:
> > From: Christoph Paasch <christoph.paasch@uclouvain.be>
> >
> > When igb_set_interrupt_capability() calls
> > igb_reset_interrupt_capability() (e.g., because CONFIG_PCI_MSI is
> unset),
> > num_q_vectors has been set but no vector has yet been allocated.
> >
> > igb_reset_interrupt_capability() will then call igb_reset_q_vector,
> > which assumes that the vector is allocated. As this is not the case,
> we
> > are accessing a NULL-pointer.
> >
> > This patch fixes it by checking that q_vector is indeed different
> from
> > NULL.
> >
> > Fixes: 02ef6e1d0b0023 (igb: Fix queue allocation method to
> accommodate changing during runtime)
> > Cc: Carolyn Wyborny <carolyn.wyborny@intel.com>
> > Signed-off-by: Christoph Paasch <christoph.paasch@uclouvain.be>
> > Tested-by: Jeff Pieper <jeffrey.e.pieper@intel.com>
> > Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
>
> Hello Jeff,
>
> shouldn't this one rather be for 'net' instead of 'net-next'? Because
> 02ef6e1d0b0023 is part of 3.14-rc1.

Yes, but being that it is late in the -rcX cycle and 3.14 is expected to
be released anytime now, it was not prudent to try and push this in
right before the window closes. It is better to have -stable pick this
up once Linus releases 3.14. Same goes for your other patch.

So once Linus releases 3.14 and Linus merges in Dave's net-next tree for
3.15, I will notify the stable maintainers that your 2 patches need to
be picked up for 3.14.x stable trees.

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 819 bytes --]