From: "J. Bruce Fields" <bfields@fieldses.org>
To: Christoph Hellwig <hch@infradead.org>
Cc: Jeff Layton <jlayton@redhat.com>,
trond.myklebust@fys.uio.no, nfsv4@linux-nfs.org,
linux-nfs@vger.kernel.org
Subject: Re: [PATCH] NLM: hold BKL when clearing global lockd task and serv vars
Date: Mon, 7 Apr 2008 13:56:15 -0400 [thread overview]
Message-ID: <20080407175615.GD3305@fieldses.org> (raw)
In-Reply-To: <20080407164500.GA17728@infradead.org>
On Mon, Apr 07, 2008 at 12:45:01PM -0400, Christoph Hellwig wrote:
> On Mon, Apr 07, 2008 at 09:38:34AM -0400, Jeff Layton wrote:
> > The global task and serv pointers for lockd are normally protected by
> > the nlmsvc_mutex. The exception is when the lockd exits abnormally. When
> > this occurs, these variables are cleared without any locking.
>
> Shouldn't we get rid of the case where it exits abnormally instead?
I tried to figure out when this could actually occur (when can
svc_recv() return an error other than -EINTR or -EAGAIN?), and got lost
in sock_recvmsg():
- svc_recv() itself returns only -EAGAIN or the return from
->xpo_recvfrom().
- the only xpo_recvfrom() that's interesting is
svc_tcp_recvfrom(), which can return the error it gets from
svc_recvfrom(), which can return the error from
kernel_recvmsg(), which gets its return from sock_recvmsg().
Since __sock_recvmsg() has a security hook, it looks like we can end up
with an -EACCES from selinux?
So one case would be selinux deciding we weren't allowed to receive
packets from this socket. Huh.
--b.
next prev parent reply other threads:[~2008-04-07 17:56 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-07 13:38 [PATCH] NFS: hold BKL when clearing nfs_callback_info.task Jeff Layton
2008-04-07 13:38 ` [PATCH] NLM: hold BKL when clearing global lockd task and serv vars Jeff Layton
2008-04-07 16:45 ` Christoph Hellwig
2008-04-07 17:40 ` Jeff Layton
2008-04-07 17:56 ` J. Bruce Fields [this message]
2008-04-07 19:08 ` Tom Tucker
2008-04-07 20:22 ` Jeff Layton
2008-04-07 20:50 ` J. Bruce Fields
2008-04-08 13:21 ` Jeff Layton
2008-04-08 16:28 ` J. Bruce Fields
2008-04-08 17:02 ` Jeff Layton
2008-04-08 19:16 ` Jeff Layton
2008-04-08 20:08 ` Chuck Lever
2008-04-08 20:20 ` Jeff Layton
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=20080407175615.GD3305@fieldses.org \
--to=bfields@fieldses.org \
--cc=hch@infradead.org \
--cc=jlayton@redhat.com \
--cc=linux-nfs@vger.kernel.org \
--cc=nfsv4@linux-nfs.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.