mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Chuck Lever" <chuck.lever@oracle.com>
To: "Cedric Le Goater" <clg@fr.ibm.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>,
	"Serge E. Hallyn" <serue@us.ibm.com>,
	"Andrew Morton" <akpm@linux-foundation.org>,
	"Trond Myklebust" <trond.myklebust@fys.uio.no>,
	"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: Wed, 10 Sep 2008 11:12:04 -0400	[thread overview]
Message-ID: <76bd70e30809100812r4a7fa71crfc7196350e3ed1cf@mail.gmail.com> (raw)
In-Reply-To: <48C791F9.8090606@fr.ibm.com>

On Wed, Sep 10, 2008 at 5:23 AM, Cedric Le Goater <clg@fr.ibm.com> wrote:
> Eric W. Biederman wrote:
>> Chuck Lever <chuck.lever@oracle.com> writes:
>>
>>> If the upper layers are responsible for providing the utsname, you will need to
>>> fix up lockd and the NFS server's callback client too, at  least.
>>
>> Actually looking at the code.  It looks like a proper fix may be  even simpler.
>> Why do we have both clnt->cl_server and clnt->cl_nodename?    Or is cl_server
>> the other side of the connection?
>>
>>>>> What are we trying to achieve by reading utsname?
>>>> It looks like it gets copied into the sunrpc messages so I assume it is
>>>> a part of the sunrpc spec?
>>> It appears to be used only for RPC's AUTH_SYS credentials.  The nodename is used
>>> to identify the caller's host.  See RFC 1831,  Appendix A:
>>>
>>>   http://rfclibrary.hosting.com/rfc/rfc1831/rfc1831-16.asp
>>
>> Thanks that helps a lot.
>>
>>> I'm not terribly familiar with uts namespaces, though.  Can someone explain why
>>> we need to distinguish between these for AUTH_SYS if the  caller is on a remote
>>> system?
>>
>> Semantically processes in different uts namespaces are on different machines.
>>
>>> I don't like the idea of an oops in here.  Instead, (for now) it should warn and
>>> fail to create the client, IMO.
>>
>> Which is interesting when the problem happens during NFS unmount.  Although
>> frankly it could fail anyway.
>>
>> It seems strange that we are creating a client during unmount anyway.
>
> the task exiting brings down the lockd thread and unregisters the lockd service
> with the portmapper. This is done with a rpc call which creates a client and a
> request.

That makes sense.

This is likely coming from lockd_down(), and is almost certainly not
coming from the same uts namespace as the lockd_up() that did the
pmap_set, which was done by the first NFS mount done in the first uts
namespace on the system.  It's just something that the kernel has to
do for maintenance.

There is only one lockd() instance that is shared among all the uts
namespaces, right?  In this case, what is the correct utsname to use?

-- 
Chuck Lever

  reply	other threads:[~2008-09-10 15:12 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-08 13:39 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
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 [this message]
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=76bd70e30809100812r4a7fa71crfc7196350e3ed1cf@mail.gmail.com \
    --to=chuck.lever@oracle.com \
    --cc=akpm@linux-foundation.org \
    --cc=chucklever@gmail.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=serue@us.ibm.com \
    --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

all inboxes | Powered by JetHome®