Hi Alex, On Fri, 2014-04-04 at 04:38 +0000, Alex Leung wrote: > From: Alex Leung <alex.leung@xxxxxxxxxx> > > 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@xxxxxxxxxx> > --- > drivers/target/target_core_tmr.c | 5 +++++ > 1 files changed, 5 insertions(+), 0 deletions(-) > > diff --git a/drivers/target/target_core_tmr.c b/drivers/target/target_core_tmr.c > index 3f0338f..f7cd95e 100644 > --- a/drivers/target/target_core_tmr.c > +++ b/drivers/target/target_core_tmr.c > @@ -130,6 +130,11 @@ void core_tmr_abort_task( > > if (dev != se_cmd->se_dev) > continue; > + > + /* skip se_cmd associated with tmr */ > + if (tmr->task_cmd == se_cmd) > + continue; > + > ref_tag = se_cmd->se_tfo->get_task_tag(se_cmd); > if (tmr->ref_task_tag != ref_tag) > continue; Nice catch. Applied to target-pending/for-next. Thanks! --nab -- To unsubscribe from this list: send the line "unsubscribe target-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html