aboutsummaryrefslogtreecommitdiff
path: root/fs/ext4/super.c
diff options
context:
space:
mode:
authorAlex Shi <alex.shi@linaro.org>2017-02-10 12:00:58 +0800
committerAlex Shi <alex.shi@linaro.org>2017-02-10 12:00:58 +0800
commitfd0d0fd17f47e0015e5be2a1e58434144a5f99e0 (patch)
treef2cb780174ccdee6d1a95fd421ef7bcf1dd4be1c /fs/ext4/super.c
parentd69f58e2b8396658b7577113f9887bd4d66d25f8 (diff)
parent6a1bd90632464c129ad5f9ca7c54917a6dd7cb4b (diff)
Merge tag 'v4.4.48' into linux-linaro-lsk-v4.4
This is the 4.4.48 stable release
Diffstat (limited to 'fs/ext4/super.c')
-rw-r--r--fs/ext4/super.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index 68640e6f95c5..b405a7b74ce0 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -3663,6 +3663,15 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent)
(EXT4_MAX_BLOCK_FILE_PHYS / EXT4_BLOCKS_PER_GROUP(sb)));
db_count = (sbi->s_groups_count + EXT4_DESC_PER_BLOCK(sb) - 1) /
EXT4_DESC_PER_BLOCK(sb);
+ if (ext4_has_feature_meta_bg(sb)) {
+ if (le32_to_cpu(es->s_first_meta_bg) >= db_count) {
+ ext4_msg(sb, KERN_WARNING,
+ "first meta block group too large: %u "
+ "(group descriptor block count %u)",
+ le32_to_cpu(es->s_first_meta_bg), db_count);
+ goto failed_mount;
+ }
+ }
sbi->s_group_desc = ext4_kvmalloc(db_count *
sizeof(struct buffer_head *),
GFP_KERNEL);