linux/drivers/net/ethernet/intel/igb
Christoph Paasch cb06d10232 igb: Fix Null-pointer dereference in igb_reset_q_vector
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: 02ef6e1d0b (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>
2014-03-21 03:48:34 -07:00
..
e1000_82575.c igb: fix warning if !CONFIG_IGB_HWMON 2014-03-08 00:36:55 -08:00
e1000_82575.h igb: enable VLAN stripping for VMs with i350 2014-03-19 21:38:54 -07:00
e1000_defines.h igb: Add register defines needed for time sync functions 2014-03-19 17:17:23 -07:00
e1000_hw.h igb: Update license text to remove FSF address and update copyright. 2014-02-26 15:54:52 -05:00
e1000_i210.c igb: Update license text to remove FSF address and update copyright. 2014-02-26 15:54:52 -05:00
e1000_i210.h igb: Update license text to remove FSF address and update copyright. 2014-02-26 15:54:52 -05:00
e1000_mac.c igb: Update license text to remove FSF address and update copyright. 2014-02-26 15:54:52 -05:00
e1000_mac.h igb: Update license text to remove FSF address and update copyright. 2014-02-26 15:54:52 -05:00
e1000_mbx.c igb: Update license text to remove FSF address and update copyright. 2014-02-26 15:54:52 -05:00
e1000_mbx.h igb: Update license text to remove FSF address and update copyright. 2014-02-26 15:54:52 -05:00
e1000_nvm.c igb: Update license text to remove FSF address and update copyright. 2014-02-26 15:54:52 -05:00
e1000_nvm.h igb: Update license text to remove FSF address and update copyright. 2014-02-26 15:54:52 -05:00
e1000_phy.c igb: Update license text to remove FSF address and update copyright. 2014-02-26 15:54:52 -05:00
e1000_phy.h igb: Update license text to remove FSF address and update copyright. 2014-02-26 15:54:52 -05:00
e1000_regs.h igb: add register rd/wr for surprise removal 2014-03-21 03:00:49 -07:00
igb_ethtool.c igb: specify phc_index of 82575 for get_ts_info 2014-03-21 03:37:24 -07:00
igb_hwmon.c igb: Update license text to remove FSF address and update copyright. 2014-02-26 15:54:52 -05:00
igb_main.c igb: Fix Null-pointer dereference in igb_reset_q_vector 2014-03-21 03:48:34 -07:00
igb_ptp.c igb: implement SIOCGHWTSTAMP ioctl 2014-03-21 02:51:24 -07:00
igb.h igb: implement SIOCGHWTSTAMP ioctl 2014-03-21 02:51:24 -07:00
Makefile igb: Update license text to remove FSF address and update copyright. 2014-02-26 15:54:52 -05:00