This is a note to let you know that I've just added the patch titled

    ext4: fix oops in ext4_quota_off()

to the 2.6.39-stable tree which can be found at:
    
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     ext4-fix-oops-in-ext4_quota_off.patch
and it can be found in the queue-2.6.39 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <sta...@kernel.org> know about it.


>From 0b26859027ce0005ef89520af20351360e51ad76 Mon Sep 17 00:00:00 2001
From: Amir Goldstein <amir7...@gmail.com>
Date: Mon, 16 May 2011 09:59:13 -0400
Subject: ext4: fix oops in ext4_quota_off()

From: Amir Goldstein <amir7...@gmail.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 <amir7...@users.sf.net>
Signed-off-by: Amir Goldstein <amir7...@users.sf.net>
Signed-off-by: Jan Kara <j...@suse.cz>
Signed-off-by: "Theodore Ts'o" <ty...@mit.edu>
Cc: Chris Dunlop <ch...@onthe.net.au>
Signed-off-by: Greg Kroah-Hartman <gre...@suse.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);


Patches currently in stable-queue which might be from amir7...@gmail.com are

queue-2.6.39/ext4-fix-oops-in-ext4_quota_off.patch

_______________________________________________
stable mailing list
stable@linux.kernel.org
http://linux.kernel.org/mailman/listinfo/stable

Reply via email to