• Jeff Skirvin's avatar
    isci: fix completion / abort path. · a5fde225
    Jeff Skirvin authored
    Corrected use of the request state_lock in the completion callback.
    
    In the case where an abort (or reset) thread is trying to terminate an
    I/O request, it sets the request state to "aborting" (or "terminating")
    if the state is still "starting".  One of the bugs was to never set the
    state to "completed".  Another was to not correctly recognize the
    situation where the I/O had completed but the sas_task was still pending
    callback to task_done - this was typically a problem in the LUN and
    device reset cases.
    
    It is now possible that we leave isci_task_abort_task() with
    request->io_request_completion pointing to localy allocated
    aborted_io_completion struct. It may result in a system crash.
    Signed-off-by: default avatarJeff Skirvin <jeffrey.d.skirvin@intel.com>
    Signed-off-by: default avatarMaciej Trela <Maciej.Trela@intel.com>
    Signed-off-by: default avatarJacek Danecki <Jacek.Danecki@intel.com>
    Signed-off-by: default avatarDan Williams <dan.j.williams@intel.com>
    a5fde225
request.c 41 KB