]> git.baikalelectronics.ru Git - kernel.git/commit
RDMA/ucma: Allow resolving address w/o specifying source address
authorRoland Dreier <roland@purestorage.com>
Thu, 19 Apr 2018 15:28:11 +0000 (08:28 -0700)
committerDoug Ledford <dledford@redhat.com>
Mon, 23 Apr 2018 15:04:05 +0000 (11:04 -0400)
commitd42c2883a2d9f6fbdd72657166681c7012a5af6c
tree70bd4955b52d75a00748feaff3fa88c511137316
parent2fcee7fb0a8c7ad3cb252b7f53917c1312e20947
RDMA/ucma: Allow resolving address w/o specifying source address

The RDMA CM will select a source device and address by consulting
the routing table if no source address is passed into
rdma_resolve_address().  Userspace will ask for this by passing an
all-zero source address in the RESOLVE_IP command.  Unfortunately
the new check for non-zero address size rejects this with EINVAL,
which breaks valid userspace applications.

Fix this by explicitly allowing a zero address family for the source.

Fixes: fb29389aedf0 ("RDMA/ucma: Check AF family prior resolving address")
Cc: <stable@vger.kernel.org>
Signed-off-by: Roland Dreier <roland@purestorage.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/core/ucma.c