]> git.baikalelectronics.ru Git - kernel.git/commit
RDMA/siw: Fix passive connection establishment
authorBernard Metzler <bmt@zurich.ibm.com>
Fri, 28 Feb 2020 17:35:34 +0000 (18:35 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 13 Apr 2020 08:48:13 +0000 (10:48 +0200)
commit02fbf981cb9ea0a7571f9cee9596f416dfe57adb
tree64d9ce9310270dec0559d9eeeb11d1f22ab90c91
parent66909a63a50e45f0ade389950957b440c056221a
RDMA/siw: Fix passive connection establishment

commit 505ab794d91e582a07352b7c4352915c5a59ee81 upstream.

Holding the rtnl_lock while iterating a devices interface address list
potentially causes deadlocks with the cma_netdev_callback. While this was
implemented to limit the scope of a wildcard listen to addresses of the
current device only, a better solution limits the scope of the socket to
the device. This completely avoiding locking, and also results in
significant code simplification.

Fixes: 7739a189c7c3 ("RDMA/siw: Add missing rtnl_lock around access to ifa")
Link: https://lore.kernel.org/r/20200228173534.26815-1-bmt@zurich.ibm.com
Reported-by: syzbot+55de90ab5f44172b0c90@syzkaller.appspotmail.com
Suggested-by: Jason Gunthorpe <jgg@ziepe.ca>
Signed-off-by: Bernard Metzler <bmt@zurich.ibm.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/infiniband/sw/siw/siw_cm.c