HomeFreeBSD

sysctl: Do not serialize requests when running as root

Description

sysctl: Do not serialize requests when running as root

Bugs or unexpected behaviour can cause a user thread to block in a
sysctl handler for a long time. "procstat -kka" is the most useful tool
to see why this might happen, but it can block on sysctlmemlock too.

Since the purpose of this lock is merely to ensure userspace can't wire
too much memory, don't require it for requests from privileged threads.

PR: 282994
Reviewed by: kib, jhb
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D47842

(cherry picked from commit 7d1d9cc440f800858b6ec8dfb5a41c853fc8c36d)

Details

Provenance
markjAuthored on Dec 21 2024, 7:25 PM
Reviewer
kib
Differential Revision
D47842: sysctl: Do not serialize requests when running as root
Parents
rG4e793a6be4f9: inpcb: Factor out parts of in6_pcbbind() and in_pcbbind_setup()
Branches
Unknown
Tags
Unknown