Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 1 Oct 2002 09:48:48 -0700 (PDT)
From:      Robert Watson <rwatson@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 18474 for review
Message-ID:  <200210011648.g91Gmm2K013528@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://people.freebsd.org/~peter/p4db/chv.cgi?CH=18474

Change 18474 by rwatson@rwatson_paprika on 2002/10/01 09:48:00

	Lock the pipe object while copying its label for return to the
	user.  This will prevent races involving simultaneous
	retrieval and setting of the pipe label.

Affected files ...

.. //depot/projects/trustedbsd/mac/sys/kern/kern_mac.c#286 edit

Differences ...

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

@@ -3807,8 +3807,9 @@
 		mac_init_pipe_label(&intlabel);
 		destroy_label = 1;
 
-		/* XXXMAC: Need pipe locking here. */
+		PIPE_LOCK(pipe);
 		mac_copy_pipe_label(pipe->pipe_label, &intlabel);
+		PIPE_UNLOCK(pipe);
 		break;
 	default:
 		error = EINVAL;

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?200210011648.g91Gmm2K013528>