• Moni Shoua's avatar
    IB/core: Don't resolve IP address to the loopback device · cbd09aeb
    Moni Shoua authored
    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 abeffce9
    ("net/mlx5e: Fix a -Wmaybe-uninitialized warning") as a reference.
    Signed-off-by: default avatarMoni Shoua <monis@mellanox.com>
    Signed-off-by: default avatarLeon Romanovsky <leon@kernel.org>
    Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
    cbd09aeb
cma.c 116 KB