Subject: [net-2.6 PATCH] ixgbe: fix possible NULL pointer deference in shutdown path

From: Jeff Kirsher <[email-masked]>
Date: Wed, 01 Dec 2010 22:54:53 -0800

From: Don Skidmore <[email-masked]>

After freeing the rings we were not zeroing out the ring count values.
This patch now clears these counts correctly.

Reported-by: Yinghai Lu <[email-masked]>
Signed-off-by: Don Skidmore <[email-masked]>
Tested-by: Stephen Ko <[email-masked]>
Signed-off-by: Jeff Kirsher <[email-masked]>
---

 0 files changed, 0 insertions(+), 0 deletions(-)

diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c
index fbad4d8..eee0b29 100644
--- a/drivers/net/ixgbe/ixgbe_main.c
+++ b/drivers/net/ixgbe/ixgbe_main.c
@@ -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);
 }