HomeFreeBSD

Reinstate returning EOVERFLOW from stats_v1_blob_clone()

Description

Reinstate returning EOVERFLOW from stats_v1_blob_clone()

a0993376ec5f (from D43179) subtly changed stats_v1_blob_clone() to stop returning EOVERFLOW in the case where the user buffer is not large enough to receive the entire statsblob. This results in any consumers which are implemented to retry on receiving EOVERFLOW to instead give up after receiving an empty statsblob header.

Fix by latching any errors recorded prior to copyout.

Reviewed by: markj
Obtained from: Netflix, Inc.
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D44585
Fixes: a0993376ec5f ("stats: Check for errors from copyout()")

(cherry picked from commit 7eb92c502eb503d808a51296e426de625239a0d9)

Details

Provenance
lstewartAuthored on Apr 2 2024, 6:34 AM
markjCommitted on Fri, Feb 14, 7:25 PM
Reviewer
markj
Differential Revision
D44585: Reinstate returning EOVERFLOW from stats_v1_blob_clone()
Parents
rGd1b263065a83: geli tests: Use shorter passphrases in setkey_passphrase
Branches
Unknown
Tags
Unknown
References
stable/14