summaryrefslogtreecommitdiff
path: root/drivers/infiniband/ulp
diff options
context:
space:
mode:
authorSagi Grimberg <sagig@mellanox.com>2015-03-29 15:52:03 +0300
committerLuis Henriques <luis.henriques@canonical.com>2015-05-05 13:09:51 +0300
commitef25b7816f1036798d22dca06d15d3c9c98dd5cc (patch)
tree6a53a39e90b8d379780e412213512b08da546ebf /drivers/infiniband/ulp
parent52c647a656ed475a39c446c05ee9c5a4633c8579 (diff)
downloadlinux-ef25b7816f1036798d22dca06d15d3c9c98dd5cc.tar.xz
iser-target: Fix session hang in case of an rdma read DIF error
commit 364189f0ada5478e4faf8a552d6071a650d757cd upstream. This hang was a result of a missing command put when a DIF error occurred during a rdma read (and we sent an CHECK_CONDITION error without passing it to the backend). Signed-off-by: Sagi Grimberg <sagig@mellanox.com> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org> Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
Diffstat (limited to 'drivers/infiniband/ulp')
-rw-r--r--drivers/infiniband/ulp/isert/ib_isert.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/infiniband/ulp/isert/ib_isert.c b/drivers/infiniband/ulp/isert/ib_isert.c
index 3a36b8bbca33..42dc264b7271 100644
--- a/drivers/infiniband/ulp/isert/ib_isert.c
+++ b/drivers/infiniband/ulp/isert/ib_isert.c
@@ -1898,11 +1898,13 @@ isert_completion_rdma_read(struct iser_tx_desc *tx_desc,
cmd->i_state = ISTATE_RECEIVED_LAST_DATAOUT;
spin_unlock_bh(&cmd->istate_lock);
- if (ret)
+ if (ret) {
+ target_put_sess_cmd(se_cmd->se_sess, se_cmd);
transport_send_check_condition_and_sense(se_cmd,
se_cmd->pi_err, 0);
- else
+ } else {
target_execute_cmd(se_cmd);
+ }
}
static void