From: Jan Kara <jack@suse.cz>
To: Amir Goldstein <amir73il@gmail.com>
Cc: Ted Ts'o <tytso@mit.edu>, Eric Sandeen <sandeen@redhat.com>,
Ext4 Developers List <linux-ext4@vger.kernel.org>,
Jan Kara <jack@suse.cz>,
linux-fsdevel <linux-fsdevel@vger.kernel.org>
Subject: Re: Regression with ext4 in kernel 2.6.39-rc7? (Was: testing ext4 master branch)
Date: Mon, 16 May 2011 11:43:24 +0200 [thread overview]
Message-ID: <20110516094324.GA5344@quack.suse.cz> (raw)
In-Reply-To: <21756A13-BE43-4B46-BDC9-F5C456476FFC@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1684 bytes --]
On Sat 14-05-11 13:16:25, Amir Goldstein wrote:
> Sent from my iPhone
>
> On 14/05/2011, at 10:11, Amir Goldstein <amir73il@gmail.com> wrote:
>
> >On Sat, May 14, 2011 at 1:49 AM, Ted Ts'o <tytso@mit.edu> wrote:
> >>On Fri, May 13, 2011 at 08:25:02PM +0300, Amir Goldstein wrote:
> >>>
> >>>After xfstests failed to build on Ubuntu 10.10, I followed the
> >>>advice omitted by the build script to run "make install-qa", to
> >>>solve the problem. It took me a while to figure exactly where I
> >>>should run the command, but in the end I pulled the xfsprogs tree,
> >>>ran "make; make install; make install-qa" and from there on things
> >>>were looking better.
> >>
> >>I did that, but fsstress doesn't pull in the needed xfs/xfs_fs.h
> >>header file. So it still dies.
> >>
> >> - Ted
> >>
> >
> >Well, anyway, the regression has to be from commit 21f97697:
> >
> >ext4: remove unnecessary [cm]time update of quota file
> >
> >because before that commit ext4_quota_off() was too short to
> >have a bug at ext4_quota_off+0x42/0xd0.
> >
> >Jan, where are you? don't make me debug this...
>
> So I guess that Jan's patch is missing
> If (!inode)
> goto out;
Exactly, that is it. I cannot trigger the problem anymore with the patch.
I just wonder how come you've spotted the problem because test 232 does not
trigger the problem for me - it is triggered when you run quotaoff without
running quotaon and that does not happen with test 232.. Anyway, with the
attached patch running quotaoff on filesystem without quotas turned on
works fine whereas previously it oopsed.
Honza
--
Jan Kara <jack@suse.cz>
SUSE Labs, CR
[-- Attachment #2: 0001-ext4-Fix-oops-in-ext4_quota_off.patch --]
[-- Type: text/x-patch, Size: 940 bytes --]
>From 91c77c4f066a9b905538bbeb1da46dc47c44855c Mon Sep 17 00:00:00 2001
From: Jan Kara <jack@suse.cz>
Date: Mon, 16 May 2011 10:49:39 +0200
Subject: [PATCH] ext4: Fix oops in ext4_quota_off()
When quota is not enabled when ext4_quota_off() is called, we must not
dereference quota file inode since it is NULL. Check properly for this.
Debugged-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Jan Kara <jack@suse.cz>
---
fs/ext4/super.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index a86e693..2a4a9b2 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -4652,6 +4652,8 @@ static int ext4_quota_off(struct super_block *sb, int type)
if (test_opt(sb, DELALLOC))
sync_filesystem(sb);
+ if (!inode)
+ goto out;
/* Update modification times of quota files when userspace can
* start looking at them */
handle = ext4_journal_start(inode, 1);
--
1.7.1
next prev parent reply other threads:[~2011-05-16 9:43 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-13 9:17 Regression with ext4 in kernel 2.6.39-rc7? (Was: testing ext4 master branch) Amir Goldstein
2011-05-13 9:27 ` Sedat Dilek
2011-05-13 10:34 ` Amir Goldstein
2011-05-13 14:56 ` Ted Ts'o
2011-05-13 15:25 ` Eric Sandeen
2011-05-13 17:25 ` Amir Goldstein
2011-05-13 17:28 ` Eric Sandeen
2011-05-13 17:31 ` Eric Sandeen
2011-05-13 17:37 ` Amir Goldstein
2011-05-13 22:49 ` Ted Ts'o
2011-05-14 7:11 ` Amir Goldstein
2011-05-14 10:16 ` Amir Goldstein
2011-05-16 9:43 ` Jan Kara [this message]
2011-05-16 9:59 ` Amir Goldstein
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=20110516094324.GA5344@quack.suse.cz \
--to=jack@suse.cz \
--cc=amir73il@gmail.com \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=sandeen@redhat.com \
--cc=tytso@mit.edu \
/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).