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()")

Details

Provenance
lstewartAuthored on Apr 2 2024, 6:34 AM
Reviewer
markj
Differential Revision
D44585: Reinstate returning EOVERFLOW from stats_v1_blob_clone()
Parents
rGa92757146909: OptionalObsoleteFiles: add missed cuda wrappers include files
Branches
Unknown
Tags
Unknown