IB/core: Honor port_num while resolving GID for IB link layer
authorParav Pandit <parav@mellanox.com>
Tue, 13 Mar 2018 14:06:14 +0000 (16:06 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 30 May 2018 05:52:32 +0000 (07:52 +0200)
commit739c8e70889a50363c4a74813509925f392df839
tree8e597b38c05bcdfca8d05979e29bf43a71aa71a0
parent7166fb17475879647f513ea84e9f96b430beee70
IB/core: Honor port_num while resolving GID for IB link layer

[ Upstream commit 563c4ba3bd2b8b0b21c65669ec2226b1cfa1138b ]

ah_attr contains the port number to which cm_id is bound. However, while
searching for GID table for matching GID entry, the port number is
ignored.

This could cause the wrong GID to be used when the ah_attr is converted to
an AH.

Reviewed-by: Daniel Jurgens <danielj@mellanox.com>
Signed-off-by: Parav Pandit <parav@mellanox.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/infiniband/core/multicast.c