All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Sandeen <sandeen@redhat.com>
To: ext4 development <linux-ext4@vger.kernel.org>
Cc: Andrew Hecox <ahecox@redhat.com>
Subject: [PATCH] debugfs - fix segfault on "stat" command with no open fs
Date: Thu, 29 Jan 2009 17:46:28 -0500	[thread overview]
Message-ID: <498231C4.6090203@redhat.com> (raw)

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.

Reported-by: Andrew Hecox <ahecox@redhat.com>
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
---

Index: e2fsprogs/debugfs/debugfs.c
===================================================================
--- e2fsprogs.orig/debugfs/debugfs.c	2008-09-12 10:37:52.000000000 -0500
+++ e2fsprogs/debugfs/debugfs.c	2009-01-29 16:36:04.748574864 -0600
@@ -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);

             reply	other threads:[~2009-01-29 22:46 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-29 22:46 Eric Sandeen [this message]
2009-03-08 23:31 ` [PATCH] debugfs - fix segfault on "stat" command with no open fs Theodore Tso

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=498231C4.6090203@redhat.com \
    --to=sandeen@redhat.com \
    --cc=ahecox@redhat.com \
    --cc=linux-ext4@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.