]> www.infradead.org Git - users/hch/xfsprogs.git/commit
xfs: zero initialize highstale and lowstale in xfs_dir2_leaf_addname
authorDarrick J. Wong <darrick.wong@oracle.com>
Mon, 6 May 2019 22:00:29 +0000 (18:00 -0400)
committerEric Sandeen <sandeen@redhat.com>
Mon, 6 May 2019 22:00:29 +0000 (18:00 -0400)
commit732a9d49fb472a513eea0d1b9b84dd3a3c94e336
treee6675160664cb1f70b8f3dc7cec5e3939310838b
parentd8ddf130cb70f376fc2d6b310f8ba2204dbc64fc
xfs: zero initialize highstale and lowstale in xfs_dir2_leaf_addname

Source kernel commit: f51fac68926235ef5bc482eb759d2c60b86fa358

Smatch complains about the following:

fs/xfs/libxfs/xfs_dir2_leaf.c:848 xfs_dir2_leaf_addname() error:
uninitialized symbol 'lowstale'.

fs/xfs/libxfs/xfs_dir2_leaf.c:849 xfs_dir2_leaf_addname() error:
uninitialized symbol 'highstale'.

I don't think there's any incorrect behavior associated with the
uninitialized variable, but as the author of the previous zero-init
patch points out, it's best not to be passing around pointers to
uninitialized stack areas.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Nathan Chancellor <natechancellor@gmail.com>
Reviewed-by: Allison Henderson <allison.henderson@oracle.com>
Reviewed-by: Bill O'Donnell <billodo@redhat.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
libxfs/xfs_dir2_leaf.c