diff options
| author | Nicholas Bellinger <nab@linux-iscsi.org> | 2014-05-06 17:32:53 +0000 |
|---|---|---|
| committer | Jiri Slaby <jslaby@suse.cz> | 2014-05-09 10:27:04 +0200 |
| commit | 1c5c8cebd7ab71c77debc63e74ec51fa3c63f9be (patch) | |
| tree | 4c21a10d07c300232dbded510e3859394be11196 /include/linux/blk-iopoll.h | |
| parent | ce2a2e7f7a4d8cfbe16bc248b325fccc983d752d (diff) | |
iser-target: Add missing se_cmd put for WRITE_PENDING in tx_comp_err
commit 03e7848a64ed535a30f5d7fc6dede2d5a6a2534b upstream.
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.
(Fix up v3.12.y context changes - nab)
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>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Diffstat (limited to 'include/linux/blk-iopoll.h')
0 files changed, 0 insertions, 0 deletions
