Skip to contentSkip to conversation

debugfs - fix segfault on "stat" command with no open fs

PATCH Applied Eric Sandeen 2 participants 2 messages Jan 29, 2009 – Mar 9, 2009

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 debugfs - fix segfault on "stat" command with no open fs

This is a regression from commit 8fdf29117f922419bd5b3f741e5d554b1d5b8893, which attempts to access current_fs via a feature check before we check that it's open.

Just moving the feature check below the open check should fix it.

---

debugfs/debugfs.c +0 -2
Index: e2fsprogs/debugfs/debugfs.c
===================================================================
@@ -291,9 +291,6 @@ void do_show_super_stats(int argc, char 
 	int	c, header_only = 0;
 	int	numdirs = 0, first, gdt_csum;
 
-	gdt_csum = EXT2_HAS_RO_COMPAT_FEATURE(current_fs->super,
-					      EXT4_FEATURE_RO_COMPAT_GDT_CSUM);
Applied
#1 lore raw
Quoted 5 lines · Eric Sandeen

This is a regression from commit 8fdf29117f922419bd5b3f741e5d554b1d5b8893, which attempts to access current_fs via a feature check before we check that it's open.

Just moving the feature check below the open check should fix it.

Thanks, applied to the e2fsprogs git tree.

- Ted