]> git.proxmox.com Git - mirror_zfs.git/commitdiff
Initialize ZIL buffers
authorBrian Behlendorf <behlendorf1@llnl.gov>
Fri, 5 Mar 2021 22:45:13 +0000 (14:45 -0800)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Mon, 8 Mar 2021 17:07:21 +0000 (09:07 -0800)
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

module/os/linux/zfs/zio_crypt.c

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