Skip to contentSkip to conversation

fix bz 231369, gfs2 will oops if you specify an invalid mount option

Cluster-devel Josef Whiter 3 participants 3 messages Mar 7, 2007 – Mar 8, 2007 GFS2 file system

lore
Share & tools
lore
#0 lore raw

Hello,

If you specify an invalid mount option when trying to mount a gfs2 filesystem, gfs2 will oops. The attached patch resolves this problem.

fs/gfs2/glock.c renamed from fs/gfs2/glock.c.josef +1 -1
@@ -2217,7 +2217,7 @@ int gfs2_create_debugfs_file(struct gfs2
 
 void gfs2_delete_debugfs_file(struct gfs2_sbd *sdp)
 {
-	if (sdp->debugfs_dentry)
+	if (sdp && sdp->debugfs_dentry)
 		debugfs_remove(sdp->debugfs_dentry);
 }
 
#1 lore raw
Quoted 11 lines · Josef Whiter

Hello,

If you specify an invalid mount option when trying to mount a gfs2 filesystem, gfs2 will oops. The attached patch resolves this problem.

fs/gfs2/glock.c int gfs2_create_debugfs_file(struct gfs2 · line 2222

Quoted 7 lines
fs/gfs2/glock.c renamed from fs/gfs2/glock.c.josef +1 -1
@@ -2217,7 +2217,7 @@ int gfs2_create_debugfs_file(struct gfs2
 
 void gfs2_delete_debugfs_file(struct gfs2_sbd *sdp)
 {
-	if (sdp->debugfs_dentry)
+	if (sdp && sdp->debugfs_dentry)
 		debugfs_remove(sdp->debugfs_dentry);
 }

ACK

Bob Peterson
Red Hat Cluster Suite

#2 lore raw
In reply to Josef Whiter

Hi,

Now in the gfs2 -nmw git tree. Thanks,

Steve.

Quoted 20 lines · Josef Whiter

Hello,

If you specify an invalid mount option when trying to mount a gfs2 filesystem, gfs2 will oops. The attached patch resolves this problem.

fs/gfs2/glock.c renamed from fs/gfs2/glock.c.josef +1 -1
@@ -2217,7 +2217,7 @@ int gfs2_create_debugfs_file(struct gfs2
 
 void gfs2_delete_debugfs_file(struct gfs2_sbd *sdp)
 {
-	if (sdp->debugfs_dentry)
+	if (sdp && sdp->debugfs_dentry)
 		debugfs_remove(sdp->debugfs_dentry);
 }