]> git.baikalelectronics.ru Git - kernel.git/commit
RDMA/cma: Fix arguments order in net device validation
authorMichael Guralnik <michaelgur@nvidia.com>
Tue, 23 Aug 2022 10:51:50 +0000 (13:51 +0300)
committerLeon Romanovsky <leonro@nvidia.com>
Mon, 29 Aug 2022 08:16:35 +0000 (11:16 +0300)
commita0fc9e6c5943406a62009615e4d8a37c00a4c999
tree33e84a88fe1677721226ed2d117ba6de7e73b8d0
parentfc7b31f4aee9ccc0ea2e845dbdd6a052705ece91
RDMA/cma: Fix arguments order in net device validation

Fix the order of source and destination addresses when resolving the
route between server and client to validate use of correct net device.

The reverse order we had so far didn't actually validate the net device
as the server would try to resolve the route to itself, thus always
getting the server's net device.

The issue was discovered when running cm applications on a single host
between 2 interfaces with same subnet and source based routing rules.
When resolving the reverse route the source based route rules were
ignored.

Fixes: 03e68401526b ("IB/cma: Validate routing of incoming requests")
Link: https://lore.kernel.org/r/1c1ec2277a131d277ebcceec987fd338d35b775f.1661251872.git.leonro@nvidia.com
Signed-off-by: Michael Guralnik <michaelgur@nvidia.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
drivers/infiniband/core/cma.c