]> git.baikalelectronics.ru Git - kernel.git/commit
iser-target: release stale iser connections
authorSagi Grimberg <sagig@mellanox.com>
Thu, 4 Jun 2015 16:49:20 +0000 (19:49 +0300)
committerNicholas Bellinger <nab@linux-iscsi.org>
Tue, 9 Jun 2015 05:16:40 +0000 (22:16 -0700)
commit01b66d87bc546b88a56b35e3690d91216ad59a60
tree123ecc3256ebcd5e2b893aa60df2287492a117a6
parent51e49932ea6fbaf9af4857198c68cfa298e689e6
iser-target: release stale iser connections

When receiving a new iser connect request we serialize
the pending requests by adding the newly created iser connection
to the np accept list and let the login thread process the connect
request one by one (np_accept_wait).

In case we received a disconnect request before the iser_conn
has begun processing (still linked in np_accept_list) we should
detach it from the list and clean it up and not have the login
thread process a stale connection. We do it only when the connection
state is not already terminating (initiator driven disconnect) as
this might lead us to access np_accept_mutex after the np was released
in live shutdown scenarios.

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