summaryrefslogtreecommitdiffstats
path: root/fs/ext2
diff options
context:
space:
mode:
authorxingaopeng <xingaopeng@huawei.com>2018-11-24 19:21:59 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-12-05 19:32:11 +0100
commit1666cf8c492d7a9b8b83e26eb139961a4c137b80 (patch)
tree88dcf1f946ad48ad790f24209bde080969c5ea2c /fs/ext2
parent553927d6aab993e1297d0c69274cd0c2df5440ca (diff)
downloadlinux-stable-1666cf8c492d7a9b8b83e26eb139961a4c137b80.tar.gz
linux-stable-1666cf8c492d7a9b8b83e26eb139961a4c137b80.tar.bz2
linux-stable-1666cf8c492d7a9b8b83e26eb139961a4c137b80.zip
ext2: initialize opts.s_mount_opt as zero before using it
commit e5f5b717983bccfa033282e9886811635602510e upstream. We need to initialize opts.s_mount_opt as zero before using it, else we may get some unexpected mount options. Fixes: 088519572ca8 ("ext2: Parse mount options into a dedicated structure") CC: stable@vger.kernel.org Signed-off-by: xingaopeng <xingaopeng@huawei.com> Signed-off-by: Jan Kara <jack@suse.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/ext2')
-rw-r--r--fs/ext2/super.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/ext2/super.c b/fs/ext2/super.c
index 73bd58fa13de..0c38e31ec938 100644
--- a/fs/ext2/super.c
+++ b/fs/ext2/super.c
@@ -895,6 +895,7 @@ static int ext2_fill_super(struct super_block *sb, void *data, int silent)
if (sb->s_magic != EXT2_SUPER_MAGIC)
goto cantfind_ext2;
+ opts.s_mount_opt = 0;
/* Set defaults before we parse the mount options */
def_mount_opts = le32_to_cpu(es->s_default_mount_opts);
if (def_mount_opts & EXT2_DEFM_DEBUG)