From owner-p4-projects Tue Oct 1 9:48:51 2002 Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 0CB2937B404; Tue, 1 Oct 2002 09:48:50 -0700 (PDT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 58DD037B40C for ; Tue, 1 Oct 2002 09:48:49 -0700 (PDT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id F0DC743E6E for ; Tue, 1 Oct 2002 09:48:48 -0700 (PDT) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from freefall.freebsd.org (perforce@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.6/8.12.6) with ESMTP id g91GmmCo013532 for ; Tue, 1 Oct 2002 09:48:48 -0700 (PDT) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by freefall.freebsd.org (8.12.6/8.12.6/Submit) id g91Gmm2K013528 for perforce@freebsd.org; Tue, 1 Oct 2002 09:48:48 -0700 (PDT) Date: Tue, 1 Oct 2002 09:48:48 -0700 (PDT) Message-Id: <200210011648.g91Gmm2K013528@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: perforce set sender to bb+lists.freebsd.perforce@cyrus.watson.org using -f From: Robert Watson Subject: PERFORCE change 18474 for review To: Perforce Change Reviews Sender: owner-p4-projects@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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