HomeFreeBSD

sendfile: Explicitly ignore errors from copyout()

Description

sendfile: Explicitly ignore errors from copyout()

There is a documented bug in sendfile.2 which notes that sendfile(2)
does not raise an error if it fails to copy out the number of bytes
written. Explicitly ignore the error from copyout() calls in
preparation for annotating copyout() with __result_use_check.

Reviewed by: glebius, kib
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D43129

(cherry picked from commit d0adc2f283ad5db6b568ca533a056c9f635551cd)

Details

Provenance
markjAuthored on Dec 26 2023, 1:41 AM
Reviewer
glebius
Differential Revision
D43129: sendfile: Explicitly ignore errors from copyout()
Parents
rG8276e3d3f8f3: ses: Add error checking for copyout() calls
Branches
Unknown
Tags
Unknown