summaryrefslogtreecommitdiffstats
path: root/drivers/net/cnic.c
diff options
context:
space:
mode:
authorMichael Chan <mchan@broadcom.com>2011-04-08 13:03:02 -0700
committerDavid S. Miller <davem@davemloft.net>2011-04-08 13:03:02 -0700
commit93ae653491f0a413d5f4d9aa4df45d09ecb55d62 (patch)
tree0540b85362f08bd551bcd9f7840a061a71996fa9 /drivers/net/cnic.c
parent782d640afd15af7a1faf01cfe566ca4ac511319d (diff)
downloadlinux-93ae653491f0a413d5f4d9aa4df45d09ecb55d62.tar.bz2
cnic: Fix rtnl deadlock
When cnic_stop_hw() -> cnic_cm_stop_bnx2x_hw() is called under rtnl_lock() from NETDEV_DOWN event, it waits for cnic_delete_task() to complete. It will deadlock when cnic_delete_task() takes rtnl_lock() before calling cnic_ulp_stop_one(). We fix it by removing the rtnl_lock() in cnic_delete_task(). cnic_ulp_stop_one() has mutex and atomic bit ops to prevent important operations from being done more than once, so it is not necessary to take rtnl_lock(). Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/cnic.c')
-rw-r--r--drivers/net/cnic.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/net/cnic.c b/drivers/net/cnic.c
index 5dfbff06631c..cde59b4e5ef8 100644
--- a/drivers/net/cnic.c
+++ b/drivers/net/cnic.c
@@ -3983,9 +3983,7 @@ static void cnic_delete_task(struct work_struct *work)
if (test_and_clear_bit(CNIC_LCL_FL_STOP_ISCSI, &cp->cnic_local_flags)) {
struct drv_ctl_info info;
- rtnl_lock();
cnic_ulp_stop_one(cp, CNIC_ULP_ISCSI);
- rtnl_unlock();
info.cmd = DRV_CTL_ISCSI_STOPPED_CMD;
cp->ethdev->drv_ctl(dev->netdev, &info);