]> git.baikalelectronics.ru Git - kernel.git/commit
target: Add check to prevent Abort Task from aborting itself
authorAlex Leung <alex.leung@emulex.com>
Fri, 4 Apr 2014 04:38:19 +0000 (04:38 +0000)
committerNicholas Bellinger <nab@linux-iscsi.org>
Fri, 11 Apr 2014 22:27:15 +0000 (15:27 -0700)
commit12930a04e0f731c9c8980b5ce4cf85d778f29ae3
tree62c12ddafcdba8431c125dd89ea5c49cdf9dffaa
parente9d3b9c7e1d2f9cb48f5db3cfe03de2b6339ed07
target: Add check to prevent Abort Task from aborting itself

This patch addresses an issue that occurs when an ABTS is received
for an se_cmd that completes just before the sess_cmd_list is searched
in core_tmr_abort_task(). When the sess_cmd_list is searched, since
the ABTS and the FCP_CMND being aborted (that just completed) both
have the same OXID, TFO->get_task_tag(TMR) returns a value that
matches tmr->ref_task_tag (from TFO->get_task_tag(FCP_CMND)), and
the Abort Task tries to abort itself. When this occurs,
transport_wait_for_tasks() hangs forever since the TMR is waiting
for itself to finish.

This patch adds a check to core_tmr_abort_task() to make sure the
TMR does not attempt to abort itself.

Signed-off-by: Alex Leung <alex.leung@emulex.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
drivers/target/target_core_tmr.c