HomeFreeBSD

Initialize dn_next_type[] in the dnode constructor

Description

Initialize dn_next_type[] in the dnode constructor

It seems nothing ensures that this array is zeroed when a dnode is
freshly allocated, so in principle it retains the values from the
previous allocation. In practice it seems to be the case that the
fields should end up zeroed, but we can zero the field anyway for
consistency.

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, 2:12 PM
Brian Behlendorf <behlendorf1@llnl.gov>Committed on Jul 26 2021, 6:53 PM
Parents
rG3a185275a017: Zero pad bytes following TX_WRITE log data
Branches
Unknown
Tags
Unknown

Event Timeline