RE: [PATCH v1 1/2] infiniband: core: fix network namespace issue with container -net=none

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




> -----Original Message-----
> From: linux-rdma-owner@xxxxxxxxxxxxxxx [mailto:linux-rdma-
> owner@xxxxxxxxxxxxxxx] On Behalf Of Qingmin Liu
> Sent: Monday, May 14, 2018 6:11 PM
> To: Doug Ledford <dledford@xxxxxxxxxx>
> Cc: Jason Gunthorpe <jgg@xxxxxxxx>; Parav Pandit <parav@xxxxxxxxxxxx>;
> Scott Branden <scott.branden@xxxxxxxxxxxx>; Ray Jui
> <ray.jui@xxxxxxxxxxxx>; linux-rdma@xxxxxxxxxxxxxxx; Qingmin Liu
> <qingmin.liu@xxxxxxxxxxxx>
> Subject: [PATCH v1 1/2] infiniband: core: fix network namespace issue with
> container -net=none
> 
> 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);
>
Thanks Qingmin for the patch.
However this is not sufficient; when address is resolved net namespace can get deleted leads to the crash.
I am waiting for recently posted gid reference count series to get merged to post next 3 series which addresses such issues.
--
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




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux