]> git.karo-electronics.de Git - karo-tx-linux.git/commit
IB/cma: Destination and source addr families must match
authorMoni Shoua <monis@mellanox.com>
Tue, 14 Feb 2017 05:24:08 +0000 (07:24 +0200)
committerDoug Ledford <dledford@redhat.com>
Wed, 15 Feb 2017 14:51:33 +0000 (09:51 -0500)
commit6df6b4a9ce43deb57d3e23b0e79a529464b5cf37
tree19ce9fea715e0a7aa66e97e796cad6aefbf61a46
parent89052d784bc977c2a0b92393f6bd57140952c206
IB/cma: Destination and source addr families must match

The destination address in a listening rdma_id does not have an address
family. Since address family in both sides of a connection must be the
same in rdma_bind_addr() we set the address family of the destination to
the address family of the source.

This patch serves the logic in cma_port_is_unique() which requires to
know if destination address that is associated with a rdma_id is any address
(cma_zero_addr() and cma_loopback_addr()).

This can happen when port reuse is checked for a port number
that is being listened to.

Fixes: 19b752a19dce ("IB/cma: Allow port reuse for rdma_id")
Signed-off-by: Moni Shoua <monis@mellanox.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/core/cma.c