]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
gconcat: Zero the metadata block before writing
authorMark Johnston <markj@FreeBSD.org>
Tue, 13 Jul 2021 21:45:59 +0000 (17:45 -0400)
committerMark Johnston <markj@FreeBSD.org>
Tue, 13 Jul 2021 21:45:59 +0000 (17:45 -0400)
commit0f09ab89cc444e468837c23cd9855689114769d4
tree372a0e2d9fc83f7530841326dac7d8b439b458da
parent7f053a44aef75eab395ce15a1c8a1399a2f89cad
gconcat: Zero the metadata block before writing

Ensure that string buffers and pad bytes are zero-filled before writing
gconcat metadata.  Also make sure to zero the full block buffer before
encoding the metadata and writing.

Fix some style bugs in g_concat_write_metadata() while here.

Reported by: KMSAN
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
sys/geom/concat/g_concat.c