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

    exofs: Fix CRASH on very early IO errors.

to the 3.4-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:
     exofs-fix-crash-on-very-early-io-errors.patch
and it can be found in the queue-3.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.


>From 6abe4a87f7bc7978705c386dbba0ca0c7790b3ec Mon Sep 17 00:00:00 2001
From: Boaz Harrosh <[email protected]>
Date: Wed, 16 May 2012 14:22:21 +0300
Subject: exofs: Fix CRASH on very early IO errors.

From: Boaz Harrosh <[email protected]>

commit 6abe4a87f7bc7978705c386dbba0ca0c7790b3ec upstream.

If at exofs_fill_super() we had an early termination
do to any error, like an IO error while reading the
super-block. We would crash inside exofs_free_sbi().

This is because sbi->oc.numdevs was set to 1, before
we actually have a device table at all.

Fix it by moving the sbi->oc.numdevs = 1 to after the
allocation of the device table.

Reported-by: Johannes Schild <[email protected]>

Signed-off-by: Boaz Harrosh <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>

---
 fs/exofs/super.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/fs/exofs/super.c
+++ b/fs/exofs/super.c
@@ -745,7 +745,6 @@ static int exofs_fill_super(struct super
        sbi->one_comp.obj.partition = opts->pid;
        sbi->one_comp.obj.id = 0;
        exofs_make_credential(sbi->one_comp.cred, &sbi->one_comp.obj);
-       sbi->oc.numdevs = 1;
        sbi->oc.single_comp = EC_SINGLE_COMP;
        sbi->oc.comps = &sbi->one_comp;
 
@@ -804,6 +803,7 @@ static int exofs_fill_super(struct super
                        goto free_sbi;
 
                ore_comp_set_dev(&sbi->oc, 0, od);
+               sbi->oc.numdevs = 1;
        }
 
        __sbi_read_stats(sbi);


Patches currently in stable-queue which might be from [email protected] are

queue-3.4/exofs-fix-crash-on-very-early-io-errors.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to