[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20110801232056.337335871@clark.kroah.org>
Date: Mon, 01 Aug 2011 16:19:12 -0700
From: Greg KH <gregkh@...e.de>
To: linux-kernel@...r.kernel.org, stable@...nel.org
Cc: stable-review@...nel.org, torvalds@...ux-foundation.org,
akpm@...ux-foundation.org, alan@...rguk.ukuu.org.uk,
Amir Goldstein <amir73il@...rs.sf.net>,
Jan Kara <jack@...e.cz>, "Theodore Tso" <tytso@....edu>,
Chris Dunlop <chris@...he.net.au>
Subject: [57/70] ext4: fix oops in ext4_quota_off()
2.6.39-stable review patch. If anyone has any objections, please let us know.
------------------
From: Amir Goldstein <amir73il@...il.com>
commit 0b26859027ce0005ef89520af20351360e51ad76 upstream.
If 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.
This fixes a bug in commit 21f976975cbe (ext4: remove unnecessary
[cm]time update of quota file), which was merged for 2.6.39-rc3.
Reported-by: Amir Goldstein <amir73il@...rs.sf.net>
Signed-off-by: Amir Goldstein <amir73il@...rs.sf.net>
Signed-off-by: Jan Kara <jack@...e.cz>
Signed-off-by: "Theodore Ts'o" <tytso@....edu>
Cc: Chris Dunlop <chris@...he.net.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@...e.de>
---
fs/ext4/super.c | 3 +++
1 file changed, 3 insertions(+)
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -4635,6 +4635,9 @@ static int ext4_quota_off(struct super_b
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);
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists