HomeFreeBSD

netinet: Fix getcred sysctl handlers to do nothing if no input is given

Description

netinet: Fix getcred sysctl handlers to do nothing if no input is given

These routines were all assuming that the sysctl handler has some new
value, but this is not the case. SYSCTL_IN() returns 0 in this
scenario, so they were all operating on an uninitialized address. This
is mostly harmless, but trips KMSAN checks, so let's fix them.

Reviewed by: zlei, rrs, glebius
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D49348

(cherry picked from commit 3ff865c6a7948b2cfc01d7056c619145b696700a)

Details

Provenance
markjAuthored on Mar 20 2025, 1:33 AM
Reviewer
zlei
Differential Revision
D49348: netinet: Fix getcred sysctl handlers to do nothing if no input is given
Parents
rG014ce35640bf: vfs: Return early from sysctl_vfs_ctl() if no input was given
Branches
Unknown
Tags
Unknown