With -net=none, docker container will use its own network namespace. Container should find its own namespace but not init_net. Fixes: 1060f8653414 ("IB/{core/cm}: Fix generating a return AH for RoCE") Signed-off-by: Qingmin Liu <qingmin.liu@xxxxxxxxxxxx> --- drivers/infiniband/core/addr.c | 2 +- drivers/infiniband/core/cma.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/infiniband/core/addr.c b/drivers/infiniband/core/addr.c index 88a7542d8c7b..a3abf9276a2b 100644 --- a/drivers/infiniband/core/addr.c +++ b/drivers/infiniband/core/addr.c @@ -788,7 +788,7 @@ int rdma_addr_find_l2_eth_by_grh(const union ib_gid *sgid, memset(&dev_addr, 0, sizeof(dev_addr)); dev_addr.bound_dev_if = ndev->ifindex; - dev_addr.net = &init_net; + dev_addr.net = dev_net(ndev); init_completion(&ctx.comp); ret = rdma_resolve_ip(&self, &sgid_addr._sockaddr, &dgid_addr._sockaddr, diff --git a/drivers/infiniband/core/cma.c b/drivers/infiniband/core/cma.c index a693fcd4c513..6b0e629ff97d 100644 --- a/drivers/infiniband/core/cma.c +++ b/drivers/infiniband/core/cma.c @@ -1621,7 +1621,7 @@ static void cma_leave_mc_groups(struct rdma_id_private *id_priv) struct net_device *ndev = NULL; if (dev_addr->bound_dev_if) - ndev = dev_get_by_index(&init_net, + ndev = dev_get_by_index(dev_addr->net, dev_addr->bound_dev_if); if (ndev) { cma_igmp_send(ndev, -- 2.7.4 -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html