aboutsummaryrefslogtreecommitdiffstats
path: root/fs/gfs2
diff options
context:
space:
mode:
authorAbhijith Das <adas@redhat.com>2007-08-23 14:33:01 -0400
committerSteven Whitehouse <swhiteho@redhat.com>2007-10-10 03:55:46 -0400
commitd1e2777d4f419a865ddccdb9b3412021d0e4de51 (patch)
treee21f64e03846aeae4a1118a2debfaac331e6256f /fs/gfs2
parentec217e0ece60f2240772e6f08e0529775846c627 (diff)
[GFS2] panic after can't parse mount arguments
When you try to mount gfs2 with -o garbage, the mount fails and the gfs2 superblock is deallocated and becomes NULL. The vfs comes around later on and calls gfs2_kill_sb. At this point the hidden gfs2 superblock pointer (sb->s_fs_info) is NULL and dereferencing it through gfs2_meta_syncfs causes the panic. (the other function call to gfs2_delete_debugfs_file() succeeds because this function already checks for a NULL pointer) Signed-off-by: Abhijith Das <adas@redhat.com> Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs/gfs2')
-rw-r--r--fs/gfs2/ops_fstype.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/gfs2/ops_fstype.c b/fs/gfs2/ops_fstype.c
index 9e0e9be1e41d..314c1134d12d 100644
--- a/fs/gfs2/ops_fstype.c
+++ b/fs/gfs2/ops_fstype.c
@@ -887,8 +887,10 @@ error:
887 887
888static void gfs2_kill_sb(struct super_block *sb) 888static void gfs2_kill_sb(struct super_block *sb)
889{ 889{
890 gfs2_delete_debugfs_file(sb->s_fs_info); 890 if (sb->s_fs_info) {
891 gfs2_meta_syncfs(sb->s_fs_info); 891 gfs2_delete_debugfs_file(sb->s_fs_info);
892 gfs2_meta_syncfs(sb->s_fs_info);
893 }
892 kill_block_super(sb); 894 kill_block_super(sb);
893} 895}
894 896