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
Brian Behlendorf <behlendorf1@llnl.gov>Committed on Jul 26 2021, 6:53 PM
Parents
rGda27b8bc7f27: Initialize "autoreplace" in spa_ld_get_props()
Branches
Unknown
Tags
Unknown

Event Timeline