]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Fix uninitialized scalar value read regression in dmu_recv_begin()
authorRichard Yao <richard.yao@alumni.stonybrook.edu>
Fri, 10 Mar 2023 22:47:56 +0000 (17:47 -0500)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Tue, 14 Mar 2023 21:40:49 +0000 (14:40 -0700)
commit1c212d1b7c4776a9639ce15e9c23af0f23c81f44
tree59ecf7dca590987b5b5e5968569d41341aa76585
parent519851122b1703b8445ec17bc89b347cea965bb9
Fix uninitialized scalar value read regression in dmu_recv_begin()

da19d919a853ad05ef300fe000e6c96c4db84bcf changed this in a way that
permits execution to reach `if (err == 0)` without initializing err.
This could randomly cause the sync task to not execute. We fix that by
initializing err to zero.

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-1535377)
Closes #14607
module/zfs/dmu_recv.c