Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 16 Nov 2002 21:49:02 -0800 (PST)
From:      Robert Watson <rwatson@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 21136 for review
Message-ID:  <200211170549.gAH5n2S3032775@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=21136

Change 21136 by rwatson@rwatson_paprika on 2002/11/16 21:48:47

	Avoid using curthread in situations where we actually do have
	thread pointer passed in; this avoids the PCPU cost, as well
	as preventing confusion by the reader regarding why curthread
	and the passed thread might be different (as well as being
	more consistent with other use of the thread in the same
	function).

Affected files ...

.. //depot/projects/trustedbsd/mac/sys/kern/kern_linker.c#18 edit

Differences ...

==== //depot/projects/trustedbsd/mac/sys/kern/kern_linker.c#18 (text+ko) ====

@@ -832,7 +832,7 @@
 	int error = 0;
 
 #ifdef MAC
-	error = mac_check_kld_stat(curthread->td_ucred);
+	error = mac_check_kld_stat(td->td_ucred);
 	if (error)
 		return (error);
 #endif
@@ -868,7 +868,7 @@
 	int error = 0;
 
 #ifdef MAC
-	error = mac_check_kld_stat(curthread->td_ucred);
+	error = mac_check_kld_stat(td->td_ucred);
 	if (error)
 		return (error);
 #endif
@@ -909,7 +909,7 @@
 	struct kld_file_stat *stat;
 
 #ifdef MAC
-	error = mac_check_kld_stat(curthread->td_ucred);
+	error = mac_check_kld_stat(td->td_ucred);
 	if (error)
 		return (error);
 #endif
@@ -964,7 +964,7 @@
 	int error = 0;
 
 #ifdef MAC
-	error = mac_check_kld_stat(curthread->td_ucred);
+	error = mac_check_kld_stat(td->td_ucred);
 	if (error)
 		return (error);
 #endif
@@ -999,7 +999,7 @@
 	int error = 0;
 
 #ifdef MAC
-	error = mac_check_kld_stat(curthread->td_ucred);
+	error = mac_check_kld_stat(td->td_ucred);
 	if (error)
 		return (error);
 #endif
@@ -1838,7 +1838,7 @@
 	int error;
 
 #ifdef MAC
-	error = mac_check_kld_stat(curthread->td_ucred);
+	error = mac_check_kld_stat(req->td->td_ucred);
 	if (error)
 		return (error);
 #endif

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe p4-projects" in the body of the message




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