]> git.proxmox.com Git - mirror_zfs.git/commit
Initialize dn_next_type[] in the dnode constructor
authorMark Johnston <markj@FreeBSD.org>
Fri, 16 Jul 2021 14:12:47 +0000 (10:12 -0400)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Mon, 26 Jul 2021 18:53:47 +0000 (11:53 -0700)
commit13737094503a38a219f1ffe641cb257bb4b879cb
tree95f53cc4b37e386e857e9107d549e43d74820c3a
parent3a185275a0172ea8d2ed8b55c7b3524c52147395
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
module/zfs/dnode.c