isci: fix completion / abort path.
authorJeff Skirvin <jeffrey.d.skirvin@intel.com>
Fri, 4 Mar 2011 22:06:42 +0000 (14:06 -0800)
committerDan Williams <dan.j.williams@intel.com>
Sun, 3 Jul 2011 10:55:29 +0000 (03:55 -0700)
commita5fde225364df30507ba1a5aafeec85e595000d3
treed86c9daaafe01e9df139fe0569d7d21ce6fa3f8d
parent11b00c194cfbd0eb0d90f32c096508b2bb8be6ec
isci: fix completion / abort path.

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: Jeff Skirvin <jeffrey.d.skirvin@intel.com>
Signed-off-by: Maciej Trela <Maciej.Trela@intel.com>
Signed-off-by: Jacek Danecki <Jacek.Danecki@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
drivers/scsi/isci/request.c
drivers/scsi/isci/task.c
This page took 0.028607 seconds and 5 git commands to generate.