diff options
author | Michael Holzheu <holzheu@de.ibm.com> | 2006-09-20 10:00:04 -0400 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2006-09-20 10:00:04 -0400 |
commit | 388c571cffc4ae4e64f0786333e811308acbbc10 (patch) | |
tree | 98bfa69fe8fa4cae331ccfa46118e40d1e80d389 /arch/s390/hypfs | |
parent | 564337f34cc10fd8f30329e4e5f14f8995db5711 (diff) |
[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: Michael Holzheu <holzheu@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/hypfs')
-rw-r--r-- | arch/s390/hypfs/inode.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/arch/s390/hypfs/inode.c b/arch/s390/hypfs/inode.c index bdcad2ea1ff4..bdade5f2e325 100644 --- a/arch/s390/hypfs/inode.c +++ b/arch/s390/hypfs/inode.c | |||
@@ -312,10 +312,12 @@ static void hypfs_kill_super(struct super_block *sb) | |||
312 | { | 312 | { |
313 | struct hypfs_sb_info *sb_info = sb->s_fs_info; | 313 | struct hypfs_sb_info *sb_info = sb->s_fs_info; |
314 | 314 | ||
315 | hypfs_delete_tree(sb->s_root); | 315 | if (sb->s_root) { |
316 | hypfs_remove(sb_info->update_file); | 316 | hypfs_delete_tree(sb->s_root); |
317 | kfree(sb->s_fs_info); | 317 | hypfs_remove(sb_info->update_file); |
318 | sb->s_fs_info = NULL; | 318 | kfree(sb->s_fs_info); |
319 | sb->s_fs_info = NULL; | ||
320 | } | ||
319 | kill_litter_super(sb); | 321 | kill_litter_super(sb); |
320 | } | 322 | } |
321 | 323 | ||