]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
RDMA/core: Check id_priv->restricted_node_type in cma_listen_on_dev()
authorStefan Metzmacher <metze@samba.org>
Tue, 24 Feb 2026 16:59:52 +0000 (17:59 +0100)
committerLeon Romanovsky <leon@kernel.org>
Wed, 25 Feb 2026 12:50:10 +0000 (07:50 -0500)
commit93a4a9b732fbb479f95d327aa867d094aed3f712
tree99be2107cea4d6cb16b867f97d70c79161d0303a
parentfaa72102b178c7ae6c6afea23879e7c84fc59b4e
RDMA/core: Check id_priv->restricted_node_type in cma_listen_on_dev()

When listening on wildcard addresses we have a global list for the application
layer rdma_cm_id and for any existing device or any device added in future we
try to listen on any wildcard listener.

When the listener has a restricted_node_type we should prevent listening on
devices with a different node type.

While there fix the documentation comment of rdma_restrict_node_type()
to include rdma_resolve_addr() instead of having rdma_bind_addr() twice.

Fixes: a760e80e90f5 ("RDMA/core: introduce rdma_restrict_node_type()")
Cc: Jason Gunthorpe <jgg@ziepe.ca>
Cc: Leon Romanovsky <leon@kernel.org>
Cc: Steve French <smfrench@gmail.com>
Cc: Namjae Jeon <linkinjeon@kernel.org>
Cc: Tom Talpey <tom@talpey.com>
Cc: Long Li <longli@microsoft.com>
Cc: linux-rdma@vger.kernel.org
Cc: linux-cifs@vger.kernel.org
Cc: samba-technical@lists.samba.org
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Link: https://patch.msgid.link/20260224165951.3582093-2-metze@samba.org
Signed-off-by: Leon Romanovsky <leon@kernel.org>
drivers/infiniband/core/cma.c
include/rdma/rdma_cm.h