aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBart Van Assche <bart.vanassche@wdc.com>2018-01-03 16:39:15 -0500
committerJason Gunthorpe <jgg@mellanox.com>2018-01-03 22:07:21 -0500
commitbec40c26041de61162f7be9d2ce548c756ce0f65 (patch)
tree4f4bafb4b8c0c54f60d797cf19737280f6608f0a
parentf8978bd95cf92f869f3d9b34c1b699f49253b8c6 (diff)
IB/srpt: Disable RDMA access by the initiator
With the SRP protocol all RDMA operations are initiated by the target. Since no RDMA operations are initiated by the initiator, do not grant the initiator permission to submit RDMA reads or writes to the target. Signed-off-by: Bart Van Assche <bart.vanassche@wdc.com> Cc: <stable@vger.kernel.org> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
-rw-r--r--drivers/infiniband/ulp/srpt/ib_srpt.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/infiniband/ulp/srpt/ib_srpt.c b/drivers/infiniband/ulp/srpt/ib_srpt.c
index 8a1bd354b1cc..7c4249038004 100644
--- a/drivers/infiniband/ulp/srpt/ib_srpt.c
+++ b/drivers/infiniband/ulp/srpt/ib_srpt.c
@@ -1013,8 +1013,7 @@ static int srpt_init_ch_qp(struct srpt_rdma_ch *ch, struct ib_qp *qp)
1013 return -ENOMEM; 1013 return -ENOMEM;
1014 1014
1015 attr->qp_state = IB_QPS_INIT; 1015 attr->qp_state = IB_QPS_INIT;
1016 attr->qp_access_flags = IB_ACCESS_LOCAL_WRITE | IB_ACCESS_REMOTE_READ | 1016 attr->qp_access_flags = IB_ACCESS_LOCAL_WRITE;
1017 IB_ACCESS_REMOTE_WRITE;
1018 attr->port_num = ch->sport->port; 1017 attr->port_num = ch->sport->port;
1019 attr->pkey_index = 0; 1018 attr->pkey_index = 0;
1020 1019