]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - releases/3.19.7/iser-target-fix-session-hang-in-case-of-an-rdma-read-dif-error.patch
4.9-stable patches
[thirdparty/kernel/stable-queue.git] / releases / 3.19.7 / iser-target-fix-session-hang-in-case-of-an-rdma-read-dif-error.patch
1 From 364189f0ada5478e4faf8a552d6071a650d757cd Mon Sep 17 00:00:00 2001
2 From: Sagi Grimberg <sagig@mellanox.com>
3 Date: Sun, 29 Mar 2015 15:52:03 +0300
4 Subject: iser-target: Fix session hang in case of an rdma read DIF error
5
6 From: Sagi Grimberg <sagig@mellanox.com>
7
8 commit 364189f0ada5478e4faf8a552d6071a650d757cd upstream.
9
10 This hang was a result of a missing command put when
11 a DIF error occurred during a rdma read (and we sent
12 an CHECK_CONDITION error without passing it to the
13 backend).
14
15 Signed-off-by: Sagi Grimberg <sagig@mellanox.com>
16 Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
17 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
18
19 ---
20 drivers/infiniband/ulp/isert/ib_isert.c | 6 ++++--
21 1 file changed, 4 insertions(+), 2 deletions(-)
22
23 --- a/drivers/infiniband/ulp/isert/ib_isert.c
24 +++ b/drivers/infiniband/ulp/isert/ib_isert.c
25 @@ -1848,11 +1848,13 @@ isert_completion_rdma_read(struct iser_t
26 cmd->i_state = ISTATE_RECEIVED_LAST_DATAOUT;
27 spin_unlock_bh(&cmd->istate_lock);
28
29 - if (ret)
30 + if (ret) {
31 + target_put_sess_cmd(se_cmd->se_sess, se_cmd);
32 transport_send_check_condition_and_sense(se_cmd,
33 se_cmd->pi_err, 0);
34 - else
35 + } else {
36 target_execute_cmd(se_cmd);
37 + }
38 }
39
40 static void