]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - fs/ext4/mballoc.c
ext4: fix stack memory corruption with 64k block size
[karo-tx-linux.git] / fs / ext4 / mballoc.c
index f418f55c2bbe1bf011f4d401731da533cbb75666..7ae43c59bc79578ddc2146328ca050ab68212bd2 100644 (file)
@@ -669,7 +669,7 @@ static void ext4_mb_mark_free_simple(struct super_block *sb,
        ext4_grpblk_t min;
        ext4_grpblk_t max;
        ext4_grpblk_t chunk;
-       unsigned short border;
+       unsigned int border;
 
        BUG_ON(len > EXT4_CLUSTERS_PER_GROUP(sb));
 
@@ -2287,7 +2287,7 @@ static int ext4_mb_seq_groups_show(struct seq_file *seq, void *v)
        struct ext4_group_info *grinfo;
        struct sg {
                struct ext4_group_info info;
-               ext4_grpblk_t counters[16];
+               ext4_grpblk_t counters[EXT4_MAX_BLOCK_LOG_SIZE + 2];
        } sg;
 
        group--;