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

Details

Provenance
markjAuthored on Thu, Mar 20, 1:33 AM
Reviewer
zlei
Differential Revision
D49348: netinet: Fix getcred sysctl handlers to do nothing if no input is given
Parents
rGd7efac1be144: Add missing ||
Branches
Unknown
Tags
Unknown