]> git.proxmox.com Git - mirror_zfs.git/commit
Initialize all fields in zfs_log_xvattr()
authorMark Johnston <markj@FreeBSD.org>
Fri, 16 Jul 2021 13:27:11 +0000 (09:27 -0400)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Mon, 26 Jul 2021 18:53:47 +0000 (11:53 -0700)
commit03363b2f86a97f95127085864a8323853f78f479
treea9101579ad406760503103c7afb933fa723ebf4d
parentda27b8bc7f2778b28fa73547ff91bb8cc962fc0e
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
module/zfs/zfs_log.c