Skip to content

Commit

Permalink
Initialize ZIL buffers
Browse files Browse the repository at this point in the history
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
  • Loading branch information
behlendorf authored Mar 5, 2021
1 parent 8a6d444 commit 6bbb44e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions module/os/linux/zfs/zio_crypt.c
Original file line number Diff line number Diff line change
Expand Up @@ -1412,6 +1412,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;
Expand Down

0 comments on commit 6bbb44e

Please sign in to comment.