svn commit: r367692 - head/sys/sys

Mateusz Guzik mjg at FreeBSD.org
Sat Nov 14 19:20:38 UTC 2020


Author: mjg
Date: Sat Nov 14 19:20:37 2020
New Revision: 367692
URL: https://svnweb.freebsd.org/changeset/base/367692

Log:
  cred: reorder cr_audit to be closer to the lock
  
  This makes cr_uid avoid sharing.

Modified:
  head/sys/sys/ucred.h

Modified: head/sys/sys/ucred.h
==============================================================================
--- head/sys/sys/ucred.h	Sat Nov 14 19:19:27 2020	(r367691)
+++ head/sys/sys/ucred.h	Sat Nov 14 19:20:37 2020	(r367692)
@@ -63,6 +63,7 @@ struct ucred {
 	struct mtx cr_mtx;
 	u_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
 	uid_t	cr_uid;			/* effective user id */
 	uid_t	cr_ruid;		/* real user id */
@@ -78,7 +79,6 @@ struct ucred {
 	void 		*cr_pspare2[2];	/* general use 2 */
 #define	cr_endcopy	cr_label
 	struct label	*cr_label;	/* MAC label */
-	struct auditinfo_addr	cr_audit;	/* Audit properties. */
 	gid_t	*cr_groups;		/* groups */
 	int	cr_agroups;		/* Available groups */
 	gid_t   cr_smallgroups[XU_NGROUPS];	/* storage for small groups */


More information about the svn-src-head mailing list