lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20110406005743.GB27844@shutemov.name>
Date:	Wed, 6 Apr 2011 03:57:43 +0300
From:	"Kirill A. Shutemov" <kirill@...temov.name>
To:	Rob Landley <rlandley@...allels.com>
Cc:	linux-kernel@...r.kernel.org, linux-nfs@...r.kernel.org,
	containers@...ts.linux-foundation.org,
	Trond Myklebust <Trond.Myklebust@...app.com>,
	Tim Spriggs <tims@...irise.org>,
	Kir Kolyshkin <kir@...allels.com>,
	Pavel Emelyanov <xemul@...allels.com>
Subject: Re: [PATCH 2/3] Supply network namespace to rpcbind.

On Thu, Mar 31, 2011 at 02:47:43AM -0500, Rob Landley wrote:
> From: Rob Landley <rlandley@...allels.com>
> 
> The sunrpc code already has some support for network namespaces,
> but rpcb_create() is still using init_net.  Its arguments include
> a sockaddr and a port, but not a struct net *.  Add one, and
> pass in the value from rpc_xprt when calling it.
> 
> Signed-off-by: Rob Landley <rlandley@...allels.com>

Acked-by: Kirill A. Shutemov <kas@...nvz.org>

BTW, it seems conflicts with my rpc_pipefs patchset. I'll rebase my
patchset, if your patches will be merged first.

> ---
> 
>  net/sunrpc/rpcb_clnt.c |    7 ++++---
>  1 file changed, 4 insertions(+), 3 deletions(-)
> 
> diff --git a/net/sunrpc/rpcb_clnt.c b/net/sunrpc/rpcb_clnt.c
> index c652e4c..25bb8f9 100644
> --- a/net/sunrpc/rpcb_clnt.c
> +++ b/net/sunrpc/rpcb_clnt.c
> @@ -223,10 +223,11 @@ out:
>  }
>  
>  static struct rpc_clnt *rpcb_create(char *hostname, struct sockaddr *srvaddr,
> -				    size_t salen, int proto, u32 version)
> +				    size_t salen, int proto, struct net *net,
> +				    u32 version)
>  {
>  	struct rpc_create_args args = {
> -		.net		= &init_net,
> +		.net		= net,
>  		.protocol	= proto,
>  		.address	= srvaddr,
>  		.addrsize	= salen,
> @@ -591,7 +592,7 @@ void rpcb_getport_async(struct rpc_task *task)
>  		task->tk_pid, __func__, bind_version);
>  
>  	rpcb_clnt = rpcb_create(clnt->cl_server, sap, salen, xprt->prot,
> -				bind_version);
> +				xprt->xprt_net, bind_version);
>  	if (IS_ERR(rpcb_clnt)) {
>  		status = PTR_ERR(rpcb_clnt);
>  		dprintk("RPC: %5u %s: rpcb_create failed, error %ld\n",
> _______________________________________________
> Containers mailing list
> Containers@...ts.linux-foundation.org
> https://lists.linux-foundation.org/mailman/listinfo/containers

-- 
 Kirill A. Shutemov
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ