From: Nicholas Bellinger <nab@xxxxxxxxxxxxxxx> This patch changes target_release_cmd_kref() to make TFO->release_cmd() call when list_empty(&se_cmd->se_cmd_list) is TRUE. This is required for TMR_ABORT_TASK operation where the referenced tag descriptor may have already been pulled of the session command list. Signed-off-by: Nicholas Bellinger <nab@xxxxxxxxxxxxxxx> --- drivers/target/target_core_transport.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/target/target_core_transport.c b/drivers/target/target_core_transport.c index 4a6ece1..17183da 100644 --- a/drivers/target/target_core_transport.c +++ b/drivers/target/target_core_transport.c @@ -4056,7 +4056,7 @@ static void target_release_cmd_kref(struct kref *kref) spin_lock_irqsave(&se_sess->sess_cmd_lock, flags); if (list_empty(&se_cmd->se_cmd_list)) { spin_unlock_irqrestore(&se_sess->sess_cmd_lock, flags); - WARN_ON(1); + se_cmd->se_tfo->release_cmd(se_cmd); return; } if (se_sess->sess_tearing_down && se_cmd->cmd_wait_set) { -- 1.7.2.5 -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html