linux_dsm_epyc7002/drivers/infiniband/ulp/isert
Nicholas Bellinger 03e7848a64 iser-target: Add missing se_cmd put for WRITE_PENDING in tx_comp_err
This patch fixes a bug where outstanding RDMA_READs with WRITE_PENDING
status require an extra target_put_sess_cmd() in isert_put_cmd() code
when called from isert_cq_tx_comp_err() + isert_cq_drain_comp_llist()
context during session shutdown.

The extra kref PUT is required so that transport_generic_free_cmd()
invokes the last target_put_sess_cmd() -> target_release_cmd_kref(),
which will complete(&se_cmd->cmd_wait_comp) the outstanding se_cmd
descriptor with WRITE_PENDING status, and awake the completion in
target_wait_for_sess_cmds() to invoke TFO->release_cmd().

The bug was manifesting itself in target_wait_for_sess_cmds() where
a se_cmd descriptor with WRITE_PENDING status would end up sleeping
indefinately.

Acked-by: Sagi Grimberg <sagig@mellanox.com>
Cc: Or Gerlitz <ogerlitz@mellanox.com>
Cc: <stable@vger.kernel.org> #3.10+
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
2014-04-07 01:48:51 -07:00
..
ib_isert.c iser-target: Add missing se_cmd put for WRITE_PENDING in tx_comp_err 2014-04-07 01:48:51 -07:00
ib_isert.h IB/isert: Support T10-PI protected transactions 2014-04-07 01:48:47 -07:00
isert_proto.h iser-target: Add iSCSI Extensions for RDMA (iSER) target driver 2013-04-25 01:09:41 -07:00
Kconfig treewide: Fix typo in Kconfig 2013-10-14 15:23:02 +02:00
Makefile iser-target: Add iSCSI Extensions for RDMA (iSER) target driver 2013-04-25 01:09:41 -07:00