HomeFreeBSD

proc_set_cred(): Allow 'newcred' to have multiple references

Description

proc_set_cred(): Allow 'newcred' to have multiple references

This is an extension needed by next commit, where some additional
reference is kept on the credentials to be set on a process in order to
keep these credentials alive even after the process lock is released (an
intervening reset of process credentials could release the reference
that the process holds).

Only 'cr_users' is incremented, as the reference (counted in 'cr_ref')
comes from the caller, who passes it to the process.

Reviewed by: kib, markj
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D53636

Details

Provenance
olceAuthored on Nov 6 2025, 10:25 PM
Reviewer
kib
Differential Revision
D53636: proc_set_cred(): Allow 'newcred' to have multiple references
Parents
rG39acb7fd86ed: geom_zero.4: Document
Branches
Unknown
Tags
Unknown