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
Tony Hutter <hutter2@llnl.gov>Committed on Sep 14 2021, 8:07 PM
Parents
rG99df200ffce8: Zero pad bytes following TX_WRITE log data
Branches
Unknown
Tags
Unknown