Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 17 Jan 2025 13:36:14 GMT
From:      Olivier Certner <olce@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: 0e17cf062975 - stable/13 - cred: proc_set_cred(): Fix debug build
Message-ID:  <202501171336.50HDaEE9086084@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by olce:

URL: https://cgit.FreeBSD.org/src/commit/?id=0e17cf06297555a34485111360caf06c213179af

commit 0e17cf06297555a34485111360caf06c213179af
Author:     Olivier Certner <olce@FreeBSD.org>
AuthorDate: 2025-01-17 13:33:42 +0000
Commit:     Olivier Certner <olce@FreeBSD.org>
CommitDate: 2025-01-17 13:35:38 +0000

    cred: proc_set_cred(): Fix debug build
    
    On stable/13, the 'cr_ref' field of 'struct ucred' is of type 'u_int',
    contrary to stable/14 and main where it is of type 'long'.
    
    This is a direct commit to stable/13.
    
    Reported by:    Jenkins
    Fixes:          b3d437832ffa ("cred: proc_set_cred(), proc_unset_cred(): Update user's process count")
---
 sys/kern/kern_prot.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys/kern/kern_prot.c b/sys/kern/kern_prot.c
index 4ab68aa826c9..95e843eb99f8 100644
--- a/sys/kern/kern_prot.c
+++ b/sys/kern/kern_prot.c
@@ -2298,7 +2298,7 @@ _proc_set_cred(struct proc *p, struct ucred *newcred, bool enforce_proc_lim)
 	PROC_LOCK_ASSERT(p, MA_OWNED);
 	KASSERT(newcred->cr_users == 0, ("%s: users %d not 0 on cred %p",
 	    __func__, newcred->cr_users, newcred));
-	KASSERT(newcred->cr_ref == 1, ("%s: ref %ld not 1 on cred %p",
+	KASSERT(newcred->cr_ref == 1, ("%s: ref %d not 1 on cred %p",
 	    __func__, newcred->cr_ref, newcred));
 
 	if (newcred->cr_ruidinfo != oldcred->cr_ruidinfo) {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202501171336.50HDaEE9086084>