• Michael Chan's avatar
    cnic: Fix rtnl deadlock · 93ae6534
    Michael Chan authored
    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: default avatarMichael Chan <mchan@broadcom.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    93ae6534
cnic.c 139 KB