]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
iser-target: release stale iser connections
authorSagi Grimberg <sagig@mellanox.com>
Thu, 4 Jun 2015 16:49:20 +0000 (19:49 +0300)
committerSasha Levin <sasha.levin@oracle.com>
Fri, 3 Jul 2015 16:34:50 +0000 (12:34 -0400)
commitf311de9c14c74df23c5e7dd83d65d3d5167c0ae7
tree978bbfdea4bb338170bad820c4ea549a8d9ce13c
parentf75aacca61d7438d4c6fa608dcfbd37fb31ae53c
iser-target: release stale iser connections

[ Upstream commit 2f1b6b7d9a815f341b18dfd26a363f37d4d3c96a ]

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>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
drivers/infiniband/ulp/isert/ib_isert.c