Skip to content

Commit

Permalink
igb: set num_rx/tx_queues to 0 when queues are freed
Browse files Browse the repository at this point in the history
An issue was seen on suspend in which the system reported a page fault.  This
was due to the new reg_idx code being called after the queues were freed.

This update prevents any for loops from going through the queues by setting
the number of queues to 0 when they are freed.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Alexander Duyck authored and David S. Miller committed Apr 2, 2009
1 parent 59c3de8 commit d1a8c9e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/net/igb/igb_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -420,6 +420,9 @@ static void igb_free_queues(struct igb_adapter *adapter)
for (i = 0; i < adapter->num_rx_queues; i++)
netif_napi_del(&adapter->rx_ring[i].napi);

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

kfree(adapter->tx_ring);
kfree(adapter->rx_ring);
}
Expand Down

0 comments on commit d1a8c9e

Please sign in to comment.