From owner-p4-projects Wed Sep 4 8:59: 8 2002 Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id B7B1B37B401; Wed, 4 Sep 2002 08:59:03 -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 301AC37B400 for ; Wed, 4 Sep 2002 08:59:03 -0700 (PDT) Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id E70D043E42 for ; Wed, 4 Sep 2002 08:59:02 -0700 (PDT) (envelope-from cvance@tislabs.com) Received: from freefall.freebsd.org (smmsp@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.4/8.12.4) with ESMTP id g84Fx2JU081473 for ; Wed, 4 Sep 2002 08:59:02 -0700 (PDT) (envelope-from cvance@tislabs.com) Received: (from perforce@localhost) by freefall.freebsd.org (8.12.4/8.12.4/Submit) id g84Flbrm080378 for perforce@freebsd.org; Wed, 4 Sep 2002 08:47:37 -0700 (PDT) Date: Wed, 4 Sep 2002 08:47:37 -0700 (PDT) Message-Id: <200209041547.g84Flbrm080378@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: perforce set sender to cvance@tislabs.com using -f From: Chris Vance Subject: PERFORCE change 17045 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=17045 Change 17045 by cvance@cvance_laptop on 2002/09/04 08:47:29 Add new goto target for MAC code in mmap. On error, make sure to grab Giant before possibly calling vput() Affected files ... .. //depot/projects/trustedbsd/mac/sys/vm/vm_mmap.c#14 edit Differences ... ==== //depot/projects/trustedbsd/mac/sys/vm/vm_mmap.c#14 (text+ko) ==== @@ -450,7 +450,7 @@ (struct vnode *)handle, 1); if ((prot & macmaxprot) != prot) { error = EACCES; - goto done; + goto macdone; } maxprot &= macmaxprot; } @@ -462,6 +462,9 @@ #endif /* MAC */ error = vm_mmap(&vms->vm_map, &addr, size, prot, maxprot, flags, handle, pos); +#ifdef MAC +macdone: +#endif mtx_lock(&Giant); if (error == 0) td->td_retval[0] = (register_t) (addr + pageoff); To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe p4-projects" in the body of the message