Commit 388c571c authored by Michael Holzheu's avatar Michael Holzheu Committed by Martin Schwidefsky

[S390] hypfs crashes with invalid mount option.

When an invalid mount option is specified, no root inode is created
for hypfs, hypfs_fill_super() returns with -EINVAL and then
hypfs_kill_super() is called. hypfs_kill_super() does not check if
the root inode has been initialized. This patch adds this check.
Signed-off-by: default avatarMichael Holzheu <holzheu@de.ibm.com>
Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
parent 564337f3
...@@ -312,10 +312,12 @@ static void hypfs_kill_super(struct super_block *sb) ...@@ -312,10 +312,12 @@ static void hypfs_kill_super(struct super_block *sb)
{ {
struct hypfs_sb_info *sb_info = sb->s_fs_info; struct hypfs_sb_info *sb_info = sb->s_fs_info;
hypfs_delete_tree(sb->s_root); if (sb->s_root) {
hypfs_remove(sb_info->update_file); hypfs_delete_tree(sb->s_root);
kfree(sb->s_fs_info); hypfs_remove(sb_info->update_file);
sb->s_fs_info = NULL; kfree(sb->s_fs_info);
sb->s_fs_info = NULL;
}
kill_litter_super(sb); kill_litter_super(sb);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment