linux-stable/drivers/infiniband/ulp/isert
Nicholas Bellinger 6cc44a6fb4 iser-target: Add missing target_put_sess_cmd for ImmedateData failure
This patch addresses a bug where an early exception for SCSI WRITE
with ImmediateData=Yes was missing the target_put_sess_cmd() call
to drop the extra se_cmd->cmd_kref reference obtained during the
normal iscsit_setup_scsi_cmd() codepath execution.

This bug was manifesting itself during session shutdown within
isert_cq_rx_comp_err() where target_wait_for_sess_cmds() would
end up waiting indefinately for the last se_cmd->cmd_kref put to
occur for the failed SCSI WRITE + ImmediateData descriptors.

This fix follows what traditional iscsi-target code already does
for the same failure case within iscsit_get_immediate_data().

Reported-by: Sagi Grimberg <sagig@dev.mellanox.co.il>
Cc: Sagi Grimberg <sagig@dev.mellanox.co.il>
Cc: Or Gerlitz <ogerlitz@mellanox.com>
Cc: stable@vger.kernel.org # 3.10+
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
2014-06-03 19:17:31 -07:00
..
ib_isert.c iser-target: Add missing target_put_sess_cmd for ImmedateData failure 2014-06-03 19:17:31 -07:00
ib_isert.h Target/iser: Fix iscsit_accept_np and rdma_cm racy flow 2014-05-15 17:09:10 -07:00
isert_proto.h
Kconfig treewide: Fix typo in Kconfig 2013-10-14 15:23:02 +02:00
Makefile