aboutsummaryrefslogtreecommitdiffstats
path: root/module/os
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2021-03-05 14:45:13 -0800
committerBrian Behlendorf <[email protected]>2021-03-08 09:07:21 -0800
commite219935f10f6f604a3dafb4727715c3741480fd4 (patch)
treea476e5f93f4c6f3c853542107e4b0083cc175d08 /module/os
parentbb9104f1e8104ab8cbe6b8053cecedb8be9fbb6c (diff)
Initialize ZIL buffers
When populating a ZIL destination buffer ensure it is always zeroed before its contents are constructed. Reviewed-by: Matthew Ahrens <[email protected]> Reviewed-by: Tom Caputi <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #11687
Diffstat (limited to 'module/os')
-rw-r--r--module/os/linux/zfs/zio_crypt.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/module/os/linux/zfs/zio_crypt.c b/module/os/linux/zfs/zio_crypt.c
index 96dabe55a..e2abc0ae2 100644
--- a/module/os/linux/zfs/zio_crypt.c
+++ b/module/os/linux/zfs/zio_crypt.c
@@ -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;