From: Sean Hefty Date: Wed, 29 May 2013 17:09:24 +0000 (-0700) Subject: RDMA/cma: Only listen on IB devices when using AF_IB X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=94d0c939416480066d4e4d69e0d3c217bc083cea;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git RDMA/cma: Only listen on IB devices when using AF_IB If an rdma_cm_id is bound to AF_IB, with a wild card address, only listen on IB devices. Signed-off-by: Sean Hefty Signed-off-by: Roland Dreier --- diff --git a/drivers/infiniband/core/cma.c b/drivers/infiniband/core/cma.c index 96d0b9a6e15e..6a0ee9265015 100644 --- a/drivers/infiniband/core/cma.c +++ b/drivers/infiniband/core/cma.c @@ -1616,6 +1616,10 @@ static void cma_listen_on_dev(struct rdma_id_private *id_priv, struct rdma_cm_id *id; int ret; + if (cma_family(id_priv) == AF_IB && + rdma_node_get_transport(cma_dev->device->node_type) != RDMA_TRANSPORT_IB) + return; + id = rdma_create_id(cma_listen_handler, id_priv, id_priv->id.ps, id_priv->id.qp_type); if (IS_ERR(id))