HomeFreeBSD

vfs_syscall.c: do not take process lock around the read of P2_NO_NEW_PRIVS

Description

vfs_syscall.c: do not take process lock around the read of P2_NO_NEW_PRIVS

The flag is write-only, and if we raced with reading the action of
setting the flag, we can as well get it under the lock.

Reviewed by: emaste, kevans
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D51708

Details

Provenance
kibAuthored on Aug 2 2025, 5:57 PM
Reviewer
emaste
Differential Revision
D51708: Some tweaks to kern_chroot(2)
Parents
rG95f8c3e1ed0c: chroot.2: Update errors and unprivileged use
Branches
Unknown
Tags
Unknown