HomeFreeBSD

sysctl_handle_string: do not malloc when SYSCTL_IN cannot fault

Description

sysctl_handle_string: do not malloc when SYSCTL_IN cannot fault

In particular, this avoids malloc(9) calls when from early tunable handling,
with no working malloc yet.

Reported and tested by: mav
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

Details

Provenance
kibAuthored on Apr 18 2021, 4:09 PM
Parents
rG578c26f31c0c: linkat(2): check NIRES_EMPTYPATH on the first fd arg
Branches
Unknown
Tags
Unknown