HomeFreeBSD

fd: Avoid truncating output buffers for KERN_PROC_{CWD,FILEDESC}

Description

fd: Avoid truncating output buffers for KERN_PROC_{CWD,FILEDESC}

These sysctls failed to return an error if the caller had provided too
short an output buffer. Change them to return ENOMEM instead, to ensure
that callers can detect truncation in the face of a concurrently
changing fd table.

PR: 228432
Discussed with: cem, jhb

(cherry picked from commit 36bd49ac4db8c62a3b354094646cbd8547ad2c51)

Details

Provenance
markjAuthored on Dec 16 2021, 9:07 PM
Parents
rGa04376045ddb: Fix variable name: freq_khz -> freq
Branches
Unknown
Tags
Unknown