cred: make the refcount signed
There are asserts on the count being > 0, but they are less useful than they can be because the type itself is unsigned. The kernel is compiled with -frapv, making wraparound perfectly defined. Differential Revision: https://reviews.freebsd.org/D39220
This commit is contained in:
+1
-1
@@ -61,7 +61,7 @@ struct loginclass;
|
||||
#if defined(_KERNEL) || defined(_WANT_UCRED)
|
||||
struct ucred {
|
||||
struct mtx cr_mtx;
|
||||
u_int cr_ref; /* (c) reference count */
|
||||
int cr_ref; /* (c) reference count */
|
||||
u_int cr_users; /* (c) proc + thread using this cred */
|
||||
struct auditinfo_addr cr_audit; /* Audit properties. */
|
||||
#define cr_startcopy cr_uid
|
||||
|
||||
Reference in New Issue
Block a user