From ef71ff833acfd3795c3af1bb800ac186561508ef Mon Sep 17 00:00:00 2001 From: Rajesh K Borundia Date: Thu, 17 Jun 2010 02:56:41 +0000 Subject: qlcnic: fix race in tx stop queue There is a race between netif_stop_queue and netif_stopped_queue check. So check once again if buffers are available to avoid race. With above logic we can also get rid of tx lock in process_cmd_ring. Signed-off-by: Rajesh K Borundia Signed-off-by: Amit Kumar Salecha Signed-off-by: David S. Miller --- drivers/net/qlcnic/qlcnic_init.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'drivers/net/qlcnic/qlcnic_init.c') diff --git a/drivers/net/qlcnic/qlcnic_init.c b/drivers/net/qlcnic/qlcnic_init.c index 2bd00d54dd3f..058ce61501c3 100644 --- a/drivers/net/qlcnic/qlcnic_init.c +++ b/drivers/net/qlcnic/qlcnic_init.c @@ -181,7 +181,9 @@ skip_rds: tx_ring = adapter->tx_ring; vfree(tx_ring->cmd_buf_arr); + tx_ring->cmd_buf_arr = NULL; kfree(adapter->tx_ring); + adapter->tx_ring = NULL; } int qlcnic_alloc_sw_resources(struct qlcnic_adapter *adapter) -- cgit v1.2.2