HomeFreeBSD

Zero zio_prop_t in flush_write_batch_impl()

Description

Zero zio_prop_t in flush_write_batch_impl()

After 67a1b0379159c46bcd60a462a2790248046c8804 was merged, coverity
started complaining about an uninitialized scalar variable in
flush_write_batch_impl() due to the new field zp.zp_brtwrite. Upon
inspection, it appears that uninitialized memory was being copied for
non-raw streams, so this is a pre-existing issue. The addition of
zp_brtwrite by the block cloning commit caused Coverity to begin to
notice it.

Reviewed-by: George Melikov <mail@gmelikov.ru>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Rob Norris <robn@despairlabs.com>
Signed-off-by: Richard Yao <richard.yao@alumni.stonybrook.edu>
Reported-by: Coverity (CID-1535378)
Closes #14607

Details

Provenance
Richard Yao <richard.yao@alumni.stonybrook.edu>Authored on Mar 10 2023, 10:42 PM
Brian Behlendorf <behlendorf1@llnl.gov>Committed on Mar 14 2023, 9:41 PM
Parents
rG1c212d1b7c47: Fix uninitialized scalar value read regression in dmu_recv_begin()
Branches
Unknown
Tags
Unknown

Event Timeline

Brian Behlendorf <behlendorf1@llnl.gov> committed rG24e61911f044: Zero zio_prop_t in flush_write_batch_impl() (authored by Richard Yao <richard.yao@alumni.stonybrook.edu>).Mar 14 2023, 9:41 PM