iser-target: Fix pending connections handling in target stack shutdown sequnce
Instead of handing a connection to the iscsi stack for processing right after accepting (rdma_accept) we only hand the connection to the iscsi core after we reached to a connected state (ESTABLISHED CM event). This will prevent two error scenrios: 1. race between rdma connection teardown and iscsi login sequence reported by Nic in: (ce9a9fc2 "iser-target: Fix REJECT CM event use-after-free OOPs") 2. target stack shutdown sequence race with constant login attempts by multiple initiators. We address this by maintaining two queues at the isert_np level: - accepted: connections that were accepted but have not reached connected state (might get rejected, unreachable or error). - pending: connections in connected state, but have yet to handed to the iscsi core for login processing. iser connections are promoted to the pending queue only from the accepted queue. This way the iscsi core now will only handle functional iser connections and once we shutdown the target stack, we look for any stales that got left behind so we can safely release them. 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>
parent
ed8cb0a4
-
mentioned in commit 6f40a250
-
mentioned in commit 13e29c37
-
mentioned in commit 0d5aad75
-
mentioned in commit 0c71ae6f
-
mentioned in commit da6ae4aa
-
mentioned in commit 2b6f8817
-
mentioned in commit 63e9e719
-
mentioned in commit 29ff057c
-
mentioned in commit f8a91a02
-
mentioned in commit 8a867ab7
-
mentioned in commit 4e55c9ab
-
mentioned in commit f77965f4
-
mentioned in commit d578ba2d
-
mentioned in commit fb0f216b
Please register or sign in to comment