Initialize ZIL buffers

When populating a ZIL destination buffer ensure it is always
zeroed before its contents are constructed.

Reviewed-by: Matthew Ahrens <mahrens@delphix.com>
Reviewed-by: Tom Caputi <caputit1@tcnj.edu>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #11687
This commit is contained in:
Brian Behlendorf 2021-03-05 14:45:13 -08:00
parent bb9104f1e8
commit e219935f10
1 changed files with 1 additions and 0 deletions

View File

@ -1399,6 +1399,7 @@ zio_crypt_init_uios_zil(boolean_t encrypt, uint8_t *plainbuf,
nr_src = 1; nr_src = 1;
nr_dst = 0; nr_dst = 0;
} }
bzero(dst, datalen);
/* find the start and end record of the log block */ /* find the start and end record of the log block */
zilc = (zil_chain_t *)src; zilc = (zil_chain_t *)src;