]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
repair: ensure that unused superblock fields are zeroed
authorDave Chinner <dchinner@redhat.com>
Tue, 8 Apr 2014 08:47:35 +0000 (18:47 +1000)
committerDave Chinner <david@fromorbit.com>
Tue, 8 Apr 2014 08:47:35 +0000 (18:47 +1000)
commit419d647de6e1722f14fda1d4981ebaa9a3dd243c
tree8236a18073854b3ff650ddbf8770134bb88136fb
parentaa210c4df0fa1eef84eeb300bb5db0ac228916df
repair: ensure that unused superblock fields are zeroed

When we grab a superblock off disk via get_sb(), we don't know what
the in-memory superblock we are filling out contained. We need to
ensure that the entire structure is returned in an initialised
state regardless of which fields libxfs_sb_from_disk() populates
from disk. In this case, it doesn't populate the sb_crc field,
and so uninitialised values can escape through to disk on v4
filesystems because of this. This causes xfs/031 to fail on v4
filesystems.

Reported-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
repair/sb.c