linux/drivers/infiniband/ulp
Jenny Derzhavetz bd3792205a 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: (ce9a9fc20a "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>
2015-09-15 15:47:27 -07:00
..
ipoib IB/ipoib: Suppress warning for send only join failures 2015-09-03 17:11:05 -04:00
iser IB/core: Make ib_dealloc_pd return void 2015-08-30 18:12:39 -04:00
isert iser-target: Fix pending connections handling in target stack shutdown sequnce 2015-09-15 15:47:27 -07:00
srp IB/srp: Fix possible protection fault 2015-09-03 15:59:48 -04:00
srpt ib_srpt: Remove ib_get_dma_mr calls 2015-08-30 18:12:35 -04:00
Makefile IB: Allow build of hw/ and ulp/ subdirectories independently 2014-06-02 14:51:12 -07:00