Date: Mon, 30 Sep 2002 13:42:41 -0700 (PDT) From: Robert Watson <rwatson@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 18401 for review Message-ID: <200209302042.g8UKgfqk099020@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://people.freebsd.org/~peter/p4db/chv.cgi?CH=18401 Change 18401 by rwatson@rwatson_curry on 2002/09/30 13:41:51 Initialize MAC label after releasing the vnode interlock but before sharing the vnode reference with other potential consumers. This prevents sleeping while holding the interlock. Affected files ... .. //depot/projects/trustedbsd/mac/sys/kern/vfs_subr.c#38 edit Differences ... ==== //depot/projects/trustedbsd/mac/sys/kern/vfs_subr.c#38 (text+ko) ==== @@ -990,14 +990,14 @@ vp->v_tag = tag; vp->v_op = vops; lockinit(&vp->v_lock, PVFS, "vnlock", VLKTIMEOUT, LK_NOPAUSE); -#ifdef MAC - mac_init_vnode(vp); -#endif *vpp = vp; vp->v_usecount = 1; vp->v_data = 0; vp->v_cachedid = -1; VI_UNLOCK(vp); +#ifdef MAC + mac_init_vnode(vp); +#endif insmntque(vp, mp); return (0); 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?200209302042.g8UKgfqk099020>