From: Adam Lackorzynski <adam@os.inf.tu-dresden.de>
To: Bian Naimeng <biannm@cn.fujitsu.com>
Cc: linux-kernel@vger.kernel.org, linux-nfs@vger.kernel.org,
Trond Myklebust <Trond.Myklebust@netapp.com>,
stable@kernel.org
Subject: Re: 2.6.35.2: NFS related Oops
Date: Tue, 17 Aug 2010 19:14:54 +0200 [thread overview]
Message-ID: <20100817171454.GB11366@os.inf.tu-dresden.de> (raw)
In-Reply-To: <4C6A5FF1.3070209@cn.fujitsu.com>
On Tue Aug 17, 2010 at 18:09:53 +0800, Bian Naimeng wrote:
> Please try to apply the followed patch.
Thanks, this fixes the Oops. Patch is required for both 2.6.35 and
2.6.36 trees.
----
We we open a positive file just with O_EXCL but no O_CREAT, may cause kernel crash.
Signed-off-by: Bian Naimeng <biannm@cn.fujitsu.com>
---
fs/nfs/dir.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c
index 29539ce..1a672dd 100644
--- a/fs/nfs/dir.c
+++ b/fs/nfs/dir.c
@@ -1100,7 +1100,7 @@ static int nfs_open_revalidate(struct dentry *dentry, struct nameidata *nd)
goto no_open_dput;
openflags = nd->intent.open.flags;
/* We cannot do exclusive creation on a positive dentry */
- if ((openflags & (O_CREAT|O_EXCL)) == (O_CREAT|O_EXCL))
+ if (openflags & O_EXCL)
goto no_open_dput;
/* We can't create new files, or truncate existing ones here */
openflags &= ~(O_CREAT|O_TRUNC);
--
1.7.0
Adam
--
Adam adam@os.inf.tu-dresden.de
Lackorzynski http://os.inf.tu-dresden.de/~adam/
next prev parent reply other threads:[~2010-08-17 17:15 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-16 21:50 2.6.35.2: NFS related Oops Adam Lackorzynski
2010-08-17 10:09 ` Bian Naimeng
2010-08-17 17:14 ` Adam Lackorzynski [this message]
2010-08-17 22:43 ` Trond Myklebust
2010-08-18 2:12 ` Bian Naimeng
2010-08-18 2:49 ` Bian Naimeng
2010-08-18 11:36 ` Adam Lackorzynski
2010-08-18 13:36 ` Trond Myklebust
2010-08-18 15:44 ` Adam Lackorzynski
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=20100817171454.GB11366@os.inf.tu-dresden.de \
--to=adam@os.inf.tu-dresden.de \
--cc=Trond.Myklebust@netapp.com \
--cc=biannm@cn.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nfs@vger.kernel.org \
--cc=stable@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;
as well as URLs for NNTP newsgroup(s).