[PATCH] EXT3 fs divide by 0 in ext3_fill_super (2.5.44)

From: Angus Sawyer (angus.sawyer@dsl.pipex.com)
Date: Mon Oct 28 2002 - 08:17:16 EST


problem:

attempting to mount an ext3 fs on a stopped md/raid1 array caused a divide by
0 error in ext3_fill_super.

Fix duplicates check already in ext2.

patch:

--- linux-2.5.44/fs/ext3/super.c Wed Oct 23 16:19:08 2002
+++ linux/fs/ext3/super.c Mon Oct 28 11:29:33 2002
@@ -986,6 +986,10 @@
                 goto out_fail;
 
         blocksize = sb_min_blocksize(sb, EXT3_MIN_BLOCK_SIZE);
+ if (!blocksize) {
+ printk(KERN_ERR "EXT3-fs: unable to set blocksize\n");
+ goto out_fail;
+ }
 
         /*
          * The ext3 superblock will not be buffer aligned for other than 1kB

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Thu Oct 31 2002 - 22:00:36 EST