OSDN Git Service

e2fsck: don't try to stop mmp if there is no superblock set up
authorEric Sandeen <sandeen@redhat.com>
Mon, 9 Sep 2013 14:33:20 +0000 (10:33 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Mon, 9 Sep 2013 14:33:31 +0000 (10:33 -0400)
commit7ff040f30f0ff3bf5e2c832da3cb577e00a52d60
tree4fae88ed1fa941733ee39eff249827be2db9bf2b
parentfc40d2924e2dc004bc9a949d09678c2cbe772851
e2fsck: don't try to stop mmp if there is no superblock set up

Under some failure cases, we can get to fatal_error()
without even having a superblock set up.  In that case,
ext2fs_mmp_stop() will segfault when it tries to dereference
fs->super.

Check for the existence of a superblock before we go
down the ext2fs_mmp_stop() path to avoid this problem.

Reported-by: Hubert Kario <hkario@redhat.com>
Addresses-Red-Hat-Bugzilla: #997972
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
e2fsck/util.c