]> git.baikalelectronics.ru Git - kernel.git/commit
IB/core: Fix wrong iterating on ports
authorMohamad Heib <mohamadh@mellanox.com>
Wed, 2 Oct 2019 12:21:27 +0000 (15:21 +0300)
committerJason Gunthorpe <jgg@mellanox.com>
Fri, 4 Oct 2019 18:50:27 +0000 (15:50 -0300)
commit910264a89a2f97f1b4aa8b17bd9576422411f720
tree09bc96faee47145f4e01efc829ba4d690b259846
parent7fc77492855c8ac7eacd762dc762fa40f1b21e8b
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: <stable@vger.kernel.org>
Fixes: 83b359cfbd0e ("RDMA: Add and use rdma_for_each_port")
Link: https://lore.kernel.org/r/20191002122127.17571-1-leon@kernel.org
Signed-off-by: Mohamad Heib <mohamadh@mellanox.com>
Reviewed-by: Erez Alfasi <ereza@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Reviewed-by: Jason Gunthorpe <jgg@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/core/security.c