HomeFreeBSD

pipe: Avoid unnecessary priv_check() calls in pipespace_new()

Description

pipe: Avoid unnecessary priv_check() calls in pipespace_new()

Running out of pipe map KVA is a rare case, so reorder checks
accordingly, presuming that calling priv_check() is more expensive than
the calculation. In particular, priv_check() might not be cheap to
evaluate if MAC hooks are installed.

Reviewed by: olce, kib
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D55378

Details

Provenance
markjAuthored on Feb 21 2026, 4:28 PM
Reviewer
olce
Differential Revision
D55378: pipe: Avoid unnecessary priv_check() calls in pipespace_new()
Parents
rG0fa6ce255661: sysctl: Avoid calling priv_check() unnecessarily
Branches
Unknown
Tags
Unknown