]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit
xfs: Don't log uninitialised fields in inode structures
authorDave Chinner <dchinner@redhat.com>
Mon, 9 Oct 2017 18:37:22 +0000 (11:37 -0700)
committerThadeu Lima de Souza Cascardo <cascardo@canonical.com>
Thu, 16 Nov 2017 13:23:22 +0000 (11:23 -0200)
commit70c17c2eb38e6c76ad0a4232a2a36de4dbc4681d
treefe4989d90b8e1f29d5d1246e4f33c016724e361e
parent7a455016f42289b8cd528aac1ae671ddb3fc2848
xfs: Don't log uninitialised fields in inode structures

BugLink: http://bugs.launchpad.net/bugs/1731951
commit 20413e37d71befd02b5846acdaf5e2564dd1c38e upstream.

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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
fs/xfs/libxfs/xfs_log_format.h
fs/xfs/xfs_inode_item.c
fs/xfs/xfs_ondisk.h