HomeFreeBSD

Initialize all fields in zfs_log_xvattr()

Description

Initialize all fields in zfs_log_xvattr()

When logging TX_SETATTR, we could otherwise fail to initialize part of
the corresponding ZIL record depending on which fields are present in
the xvattr. Initialize the creation time and the AV scan timestamp to
zero so that uninitialized bytes are not written to the ZIL.

This was found using KMSAN.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Signed-off-by: Mark Johnston <markj@FreeBSD.org>
Closes #12383

Details

Provenance
markjAuthored on Jul 16 2021, 1:27 PM
Tony Hutter <hutter2@llnl.gov>Committed on Sep 14 2021, 7:42 PM
Parents
rGfceda40c1e66: Initialize "autoreplace" in spa_ld_get_props()
Branches
Unknown
Tags
Unknown