]> git.proxmox.com Git - mirror_ubuntu-eoan-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)
commitcbd09aebc2d62095b05797af5c9a315e3a71dcea
treeb8b7eed2c10d5b8901891348ce80a57027cc5dd5
parentbebb2a473a43c8f84a8210687d1cbdde503046d7
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 abeffce90c7f
("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