• Divy Le Ray's avatar
    cxgb3: fix workqueue flush issues · c80b0c28
    Divy Le Ray authored
    The fatal error task can be scheduled while processing an offload packet
    in NAPI context when the connection handle is bogus. this can race
    with the ports being brought down and the cxgb3 workqueue being flushed.
    Stop napi processing before flushing the work queue.
    
    The ULP drivers (iSCSI, iWARP) might also schedule a task on keventd_wk
    while releasing a connection handle (cxgb3_offload.c::cxgb3_queue_tid_release()).
    The driver however does not flush any work on keventd_wq while being unloaded.
    This patch also fixes this.
    
    Also call cancel_delayed_work_sync in place of the the deprecated
    cancel_rearming_delayed_workqueue.
    Signed-off-by: default avatarDivy Le Ray <divy@chelsio.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    c80b0c28
cxgb3_main.c 81.3 KB