]> git.baikalelectronics.ru Git - kernel.git/commit
IB/core: Don't resolve IP address to the loopback device
authorMoni Shoua <monis@mellanox.com>
Tue, 23 May 2017 07:48:45 +0000 (10:48 +0300)
committerDoug Ledford <dledford@redhat.com>
Mon, 17 Jul 2017 15:45:42 +0000 (11:45 -0400)
commit0e341008015efa3812b9fdbaf8aada37f3e7b5b7
treeb8b7eed2c10d5b8901891348ce80a57027cc5dd5
parent2211f67750971108a2786b879c2200e4053286a1
IB/core: Don't resolve IP address to the loopback device

When resolving an IP address that is on the host of the caller the
result from querying the routing table is the loopback device. This is
not a valid response, because it doesn't represent the RDMA device and
the port.

Therefore, callers need to check the resolved device and if it is a
loopback device find an alternative way to resolve it. To avoid this we
make sure that the response from rdma_resolve_ip() will not be the
loopback device.

While that, we fix an static checker warning about dereferencing an
unintitialized pointer using the same solution as in commit e4d171703f39
("net/mlx5e: Fix a -Wmaybe-uninitialized warning") as a reference.

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/addr.c
drivers/infiniband/core/cma.c
drivers/infiniband/core/verbs.c