Skip to content

Commit

Permalink
ixgbe: fix possible NULL pointer deference in shutdown path
Browse files Browse the repository at this point in the history
After freeing the rings we were not zeroing out the ring count values.
This patch now clears these counts correctly.

Reported-by: Yinghai Lu <yinghai@kernel.org>
Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com>
Tested-by: Stephen Ko <stephen.s.ko@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Don Skidmore authored and David S. Miller committed Dec 6, 2010
1 parent 46bcf14 commit b8eb3a1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/net/ixgbe/ixgbe_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -4771,6 +4771,9 @@ void ixgbe_clear_interrupt_scheme(struct ixgbe_adapter *adapter)
adapter->rx_ring[i] = NULL;
}

adapter->num_tx_queues = 0;
adapter->num_rx_queues = 0;

ixgbe_free_q_vectors(adapter);
ixgbe_reset_interrupt_capability(adapter);
}
Expand Down

0 comments on commit b8eb3a1

Please sign in to comment.