]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit - logprint/log_print_all.c
xfs: Don't log uninitialised fields in inode structures
authorDave Chinner <dchinner@redhat.com>
Wed, 18 Oct 2017 18:39:02 +0000 (13:39 -0500)
committerEric Sandeen <sandeen@redhat.com>
Wed, 18 Oct 2017 18:39:02 +0000 (13:39 -0500)
commit87daa5530d59f5f31b312fc959432855cfff7147
treebd38da7ba348b32b791a9af1c1d9147fae7b2a5f
parent7fbe9b543787a37e43c69e741716ddd4d784ee0e
xfs: Don't log uninitialised fields in inode structures

Source kernel commit: 20413e37d71befd02b5846acdaf5e2564dd1c38e

Prevent kmemcheck from throwing warnings about reading uninitialised
memory when formatting inodes into the incore log buffer. There are
several issues here - we don't always log all the fields in the
inode log format item, and we never log the inode the
di_next_unlinked field.

In the case of the inode log format item, this is exacerbated
by the old xfs_inode_log_format structure padding issue. Hence make
the padded, 64 bit aligned version of the structure the one we always
use for formatting the log and get rid of the 64 bit variant. This
means we'll always log the 64-bit version and so recovery only needs
to convert from the unpadded 32 bit version from older 32 bit
kernels.

Signed-Off-By: Dave Chinner <dchinner@redhat.com>
Tested-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
libxfs/xfs_log_format.h
logprint/log_misc.c
logprint/log_print_all.c