]> git.baikalelectronics.ru Git - kernel.git/commit
iser-target: Put the reference on commands waiting for unsol data
authorJenny Derzhavetz <jennyf@mellanox.com>
Sun, 6 Sep 2015 11:52:21 +0000 (14:52 +0300)
committerNicholas Bellinger <nab@linux-iscsi.org>
Tue, 15 Sep 2015 22:47:21 +0000 (15:47 -0700)
commit0f0fe973a327e7c4a38f5026234e6b090e889630
treeecf2ab459184cdafb3a8e9fa23e6e1634f3fb6e3
parentb806d3d2d7500b7948a5933ea0fe6804105ebf1d
iser-target: Put the reference on commands waiting for unsol data

The iscsi target core teardown sequence calls wait_conn for
all active commands to finish gracefully by:
- move the queue-pair to error state
- drain all the completions
- wait for the core to finish handling all session commands

However, when tearing down a session while there are sequenced
commands that are still waiting for unsolicited data outs, we can
block forever as these are missing an extra reference put.

We basically need the equivalent of iscsit_free_queue_reqs_for_conn()
which is called after wait_conn has returned. Address this by an
explicit walk on conn_cmd_list and put the extra reference.

Signed-off-by: Jenny Derzhavetz <jennyf@mellanox.com>
Signed-off-by: Sagi Grimberg <sagig@mellanox.com>
Cc: <stable@vger.kernel.org> # v3.10+
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
drivers/infiniband/ulp/isert/ib_isert.c