From: "J. Bruce Fields" <bfields@fieldses.org>
To: linux-nfs@vger.kernel.org
Subject: 2.6.36 access-bits bugfix
Date: Thu, 2 Sep 2010 17:13:11 -0400 [thread overview]
Message-ID: <20100902211311.GF24608@fieldses.org> (raw)
I intend to pass this along to Linus as a 2.6.36 bugfix.
This is one of several bugs that have been due to ignoring the existance
of higher bits in the access mask. I wonder what we could change to
eliminate the whole class of problems? Maybe store these bits into
separate fields right away in the xdr decoding?
--b.
commit 8f34a430ac16d5fbd9d6b383184d35e152f5a963
Author: J. Bruce Fields <bfields@redhat.com>
Date: Thu Sep 2 15:23:16 2010 -0400
nfsd4: mask out non-access bits in nfs4_access_to_omode
This fixes an unnecessary BUG().
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
index 3dfef06..cf0d2ff 100644
--- a/fs/nfsd/nfs4state.c
+++ b/fs/nfsd/nfs4state.c
@@ -440,7 +440,7 @@ test_share(struct nfs4_stateid *stp, struct nfsd4_open *open) {
static int nfs4_access_to_omode(u32 access)
{
- switch (access) {
+ switch (access & NFS4_SHARE_ACCESS_BOTH) {
case NFS4_SHARE_ACCESS_READ:
return O_RDONLY;
case NFS4_SHARE_ACCESS_WRITE:
reply other threads:[~2010-09-02 21:13 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20100902211311.GF24608@fieldses.org \
--to=bfields@fieldses.org \
--cc=linux-nfs@vger.kernel.org \
/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