aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMohamad Heib <[email protected]>2019-10-02 15:21:27 +0300
committerJason Gunthorpe <[email protected]>2019-10-04 15:50:27 -0300
commit1cbe866cbcb53338de33cf67262e73f9315a9725 (patch)
tree09bc96faee47145f4e01efc829ba4d690b259846
parent594e6c5d41ed2471ab0b90f3f0b66cdf618b7ac9 (diff)
IB/core: Fix wrong iterating on ports
rdma_for_each_port is already incrementing the iterator's value it receives therefore, after the first iteration the iterator is increased by 2 which eventually causing wrong queries and possible traces. Fix the above by removing the old redundant incrementation that was used before rdma_for_each_port() macro. Cc: <[email protected]> Fixes: ea1075edcbab ("RDMA: Add and use rdma_for_each_port") Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mohamad Heib <[email protected]> Reviewed-by: Erez Alfasi <[email protected]> Signed-off-by: Leon Romanovsky <[email protected]> Reviewed-by: Jason Gunthorpe <[email protected]> Signed-off-by: Jason Gunthorpe <[email protected]>
-rw-r--r--drivers/infiniband/core/security.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/core/security.c b/drivers/infiniband/core/security.c
index 1ab423b19f77..6eb6d2717ca5 100644
--- a/drivers/infiniband/core/security.c
+++ b/drivers/infiniband/core/security.c
@@ -426,7 +426,7 @@ int ib_create_qp_security(struct ib_qp *qp, struct ib_device *dev)
int ret;
rdma_for_each_port (dev, i) {
- is_ib = rdma_protocol_ib(dev, i++);
+ is_ib = rdma_protocol_ib(dev, i);
if (is_ib)
break;
}