diff options
author | Alexander Duyck <alexander.h.duyck@intel.com> | 2012-07-16 19:44:48 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-07-17 05:56:53 -0400 |
commit | 10cc1bdd5ef65f60f570b594c4c066d763c128fb (patch) | |
tree | b0732c876912dfab1e4570c8e846ad6fa0c9fbeb /drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c | |
parent | ef764a13b8f4bc4b532a51bc37c35b3974831b29 (diff) |
ixgbevf: Fix panic when loading driver
This patch addresses a kernel panic seen when setting up the interface.
Specifically we see a NULL pointer dereference on the Tx descriptor cleanup
path when enabling interrupts. This change corrects that so it cannot
occur.
Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Acked-by: Greg Rose <gregory.v.rose@intel.com>
Tested-by: Sibai Li <sibai.li@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c')
-rw-r--r-- | drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c index 8b304a43a22d..41e32257a4e8 100644 --- a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c +++ b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c | |||
@@ -201,6 +201,9 @@ static bool ixgbevf_clean_tx_irq(struct ixgbevf_adapter *adapter, | |||
201 | unsigned int i, eop, count = 0; | 201 | unsigned int i, eop, count = 0; |
202 | unsigned int total_bytes = 0, total_packets = 0; | 202 | unsigned int total_bytes = 0, total_packets = 0; |
203 | 203 | ||
204 | if (test_bit(__IXGBEVF_DOWN, &adapter->state)) | ||
205 | return true; | ||
206 | |||
204 | i = tx_ring->next_to_clean; | 207 | i = tx_ring->next_to_clean; |
205 | eop = tx_ring->tx_buffer_info[i].next_to_watch; | 208 | eop = tx_ring->tx_buffer_info[i].next_to_watch; |
206 | eop_desc = IXGBE_TX_DESC_ADV(*tx_ring, eop); | 209 | eop_desc = IXGBE_TX_DESC_ADV(*tx_ring, eop); |