Skip to content
Commit 9fc11ae5 authored by Mohamad Heib's avatar Mohamad Heib Committed by Paul Gortmaker
Browse files

IB/core: Fix wrong iterating on ports

commit 1cbe866c upstream.

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: ea1075ed

 ("RDMA: Add and use rdma_for_each_port")
Link: https://lore.kernel.org/r/20191002122127.17571-1-leon@kernel.org
Signed-off-by: default avatarMohamad Heib <mohamadh@mellanox.com>
Reviewed-by: default avatarErez Alfasi <ereza@mellanox.com>
Signed-off-by: default avatarLeon Romanovsky <leonro@mellanox.com>
Reviewed-by: default avatarJason Gunthorpe <jgg@mellanox.com>
Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
Signed-off-by: default avatarPaul Gortmaker <paul.gortmaker@windriver.com>
parent fee3c625
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment