From: Nicholas Bellinger <nab@xxxxxxxxxxxxxxx> This patch drops the special case handling in tcm_qla2xxx_free_cmd() that was originally required with TRANSPORT_FREE_CMD_INTR operation. This is no longer required with tcm_qla2xxx_complete_free from wq context, and was causing an OOPs during emulated failure handling with malformed INQUIRY and other control CDB exceptions. Reported-by: Roland Dreier <roland@xxxxxxxxxxxxxxx> Signed-off-by: Nicholas Bellinger <nab@xxxxxxxxxxxxxxx> --- drivers/scsi/qla2xxx/tcm_qla2xxx.c | 15 --------------- 1 files changed, 0 insertions(+), 15 deletions(-) diff --git a/drivers/scsi/qla2xxx/tcm_qla2xxx.c b/drivers/scsi/qla2xxx/tcm_qla2xxx.c index 0e088b5..7f5477c 100644 --- a/drivers/scsi/qla2xxx/tcm_qla2xxx.c +++ b/drivers/scsi/qla2xxx/tcm_qla2xxx.c @@ -401,21 +401,6 @@ static void tcm_qla2xxx_complete_free(struct work_struct *work) */ void tcm_qla2xxx_free_cmd(struct qla_tgt_cmd *cmd) { - barrier(); - /* - * Handle tcm_qla2xxx_init_cmd() -> transport_get_lun_for_cmd() - * failure case where cmd->se_cmd.se_dev was not assigned, and - * a call to transport_generic_free_cmd_intr() is not possible.. - */ - if (!cmd->se_cmd.se_dev) { - target_put_sess_cmd(cmd->se_cmd.se_sess, &cmd->se_cmd); - transport_generic_free_cmd(&cmd->se_cmd, 0); - return; - } - - if (!atomic_read(&cmd->se_cmd.t_transport_complete)) - target_put_sess_cmd(cmd->se_cmd.se_sess, &cmd->se_cmd); - INIT_WORK(&cmd->work, tcm_qla2xxx_complete_free); queue_work(tcm_qla2xxx_free_wq, &cmd->work); } -- 1.7.2.5 -- 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