git: fca3395674d4 - stable/14 - cred: fix struct credbatch to use long for refcount
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 15 Apr 2025 19:44:32 UTC
The branch stable/14 has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=fca3395674d41fded108e493c6b5695bb6dcd077 commit fca3395674d41fded108e493c6b5695bb6dcd077 Author: Gleb Smirnoff <glebius@FreeBSD.org> AuthorDate: 2025-03-29 22:09:15 +0000 Commit: Gleb Smirnoff <glebius@FreeBSD.org> CommitDate: 2025-04-15 19:40:02 +0000 cred: fix struct credbatch to use long for refcount This structure collects count from multiple cred structures. Of course it can't use a smaller type. PR: 283747 Reviewed by: olce, mjg, markj Differential Revision: https://reviews.freebsd.org/D49562 Fixes: 37337709d3334f32650ba3a7c529fa013ed5e1f2 (cherry picked from commit cd46e980134f6fc765b28ee9c8bf41e8fc1b0261) --- sys/kern/kern_prot.c | 2 +- sys/sys/ucred.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/kern/kern_prot.c b/sys/kern/kern_prot.c index 31652a338e8e..d0f4c8cd6992 100644 --- a/sys/kern/kern_prot.c +++ b/sys/kern/kern_prot.c @@ -2365,7 +2365,7 @@ crunuse(struct thread *td) } static void -crunusebatch(struct ucred *cr, int users, int ref) +crunusebatch(struct ucred *cr, u_int users, long ref) { KASSERT(users > 0, ("%s: passed users %d not > 0 ; cred %p", diff --git a/sys/sys/ucred.h b/sys/sys/ucred.h index be7d5bab1d19..f43e3bb12414 100644 --- a/sys/sys/ucred.h +++ b/sys/sys/ucred.h @@ -195,8 +195,8 @@ struct proc; struct credbatch { struct ucred *cred; - int users; - int ref; + u_int users; + long ref; }; static inline void