public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Serge E. Hallyn" <serue@us.ibm.com>
To: Cedric Le Goater <clg@fr.ibm.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	"Eric W. Biederman" <ebiederm@xmission.com>,
	Trond Myklebust <trond.myklebust@fys.uio.no>,
	Chuck Lever <chuck.lever@oracle.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Linux Containers <containers@lists.osdl.org>,
	linux-nfs@vger.kernel.org
Subject: Re: [RFC][PATCH] sunrpc: fix oops in rpc_create() when the mount namespace is unshared
Date: Mon, 8 Sep 2008 10:43:53 -0500	[thread overview]
Message-ID: <20080908154353.GA21168@us.ibm.com> (raw)
In-Reply-To: <48C546C0.504@fr.ibm.com>

Quoting Cedric Le Goater (clg@fr.ibm.com):
> Serge E. Hallyn wrote:
> > Quoting Cedric Le Goater (clg@fr.ibm.com):
> >> On a system with nfs mounts, if a task unshares its mount namespace,
> >> a oops can occur when the system is rebooted if the task is the last
> >> to unreference the nfs mount. It will try to create a rpc request
> >> using utsname() which has been invalidated by free_nsproxy().
> >>
> >> The patch fixes the issue by using the global init_utsname() but at
> >> the same time, it breaks the capability of identifying rpc clients
> >> per uts namespace.
> >>
> >> Any better suggestions ?
> > 
> > But the utsname gets freed after the mnt_ns, so the analysis seems
> > wrong somehow.
> 
> yes but switch_task_namespaces() assigns ->nsproxy to NULL. the result
> is the same.
> 
> > I trust addr2line or whatever verified that rpc_create+0x332/0x42f is
> > exactly at the call to utsname()?
> 
> yes. it points to net/sunrpc/clnt.c:216
> 
> 	clnt->cl_nodelen = strlen(utsname()->nodename);

Pavel, at the mini-summit you mentioned sunrpc transports as one
example of the mini-namespaces openvz currently implements.  We
then apparently went off on a bit of a tangent
(http://wiki.openvz.org/Containers/Mini-summit_2008_notes#Namespaces_and_containers)
after Dave asked for a list of mini-namespaces openvz implements.

What exactly is openvz doing with sunrpc transports, and would it
be a better solution to this problem?

thanks,
-serge

  reply	other threads:[~2008-09-08 15:44 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-08 13:39 [RFC][PATCH] sunrpc: fix oops in rpc_create() when the mount namespace is unshared Cedric Le Goater
2008-09-08 15:19 ` Serge E. Hallyn
2008-09-08 15:27   ` Serge E. Hallyn
2008-09-08 15:37   ` Cedric Le Goater
2008-09-08 15:43     ` Serge E. Hallyn [this message]
2008-09-08 16:09 ` Eric W. Biederman
2008-09-09 11:54   ` Cedric Le Goater
2008-09-09 12:43 ` Serge E. Hallyn
2008-09-09 15:09   ` Eric W. Biederman
2008-09-09 15:29     ` Serge E. Hallyn
2008-09-09 15:40       ` Cedric Le Goater
2008-09-09 17:07       ` Chuck Lever
2008-09-09 18:20         ` Eric W. Biederman
2008-09-09 19:00           ` Chuck Lever
2008-09-09 20:08             ` Eric W. Biederman
2008-09-10  9:23           ` Cedric Le Goater
2008-09-10 15:12             ` Chuck Lever
2008-09-10 20:02               ` Eric W. Biederman
2008-09-10 20:54                 ` Chuck Lever
2008-09-11  9:02                 ` Cedric Le Goater
2008-09-11 10:27                   ` Eric W. Biederman
2008-09-11 16:39                   ` Chuck Lever

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080908154353.GA21168@us.ibm.com \
    --to=serue@us.ibm.com \
    --cc=akpm@linux-foundation.org \
    --cc=chuck.lever@oracle.com \
    --cc=clg@fr.ibm.com \
    --cc=containers@lists.osdl.org \
    --cc=ebiederm@xmission.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=trond.myklebust@fys.uio.no \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox