]> www.infradead.org Git - users/jedix/linux-maple.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 22 Oct 2015 21:43:11 +0000 (14:43 -0700)
commitb6ac3aee1c73d5b107ae6ec6e3715b39db782781
tree33b362fcef5d9dac983cdd218dcd3ea5aabeffff
parent060f45157d2a43dffd51a10e9707336f58ae34b7
iser-target: Put the reference on commands waiting for unsol data

commit 3e03c4b01da3e6a5f3081eb0aa252490fe83e352 upstream.

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>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/infiniband/ulp/isert/ib_isert.c