Since patch "IB/srpt: chain RDMA READ/WRITE requests" there are
two loops that process the command wait list. ch->cmd_wait_list
is accessed without locking which means that all code that
accesses this list must be serialized. Since processing of the
RTU event happens from another context than IB WC processing,
remove the wait list processing code from the RTU handler.

Fixes: commit a42d985bd5b2 ("ib_srpt: Initial SRP Target merge for v3.3-rc1").
Signed-off-by: Bart Van Assche <bart.vanass...@sandisk.com>
Cc: Christoph Hellwig <h...@lst.de>
---
 drivers/infiniband/ulp/srpt/ib_srpt.c | 8 --------
 1 file changed, 8 deletions(-)

diff --git a/drivers/infiniband/ulp/srpt/ib_srpt.c 
b/drivers/infiniband/ulp/srpt/ib_srpt.c
index b42cf0d..48b27dc 100644
--- a/drivers/infiniband/ulp/srpt/ib_srpt.c
+++ b/drivers/infiniband/ulp/srpt/ib_srpt.c
@@ -2540,15 +2540,7 @@ static void srpt_cm_rtu_recv(struct ib_cm_id *cm_id)
        BUG_ON(!ch);
 
        if (srpt_test_and_set_ch_state(ch, CH_CONNECTING, CH_LIVE)) {
-               struct srpt_recv_ioctx *ioctx, *ioctx_tmp;
-
                ret = srpt_ch_qp_rts(ch, ch->qp);
-
-               list_for_each_entry_safe(ioctx, ioctx_tmp, &ch->cmd_wait_list,
-                                        wait_list) {
-                       list_del(&ioctx->wait_list);
-                       srpt_handle_new_iu(ch, ioctx, NULL);
-               }
                if (ret)
                        srpt_close_ch(ch);
        }
-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to