Date: Tue, 30 Apr 2002 12:06:27 -0700 (PDT) From: Robert Watson <rwatson@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 10532 for review Message-ID: <200204301906.g3UJ6R853857@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://people.freebsd.org/~peter/p4db/chv.cgi?CH=10532 Change 10532 by rwatson@rwatson_curry on 2002/04/30 12:06:15 Grab a vnode lock before entering mac_cred_check_open_vnode() to prevent assertion failures in fcntl() with F_SETFL. Possibly eventually this hook should change some. Affected files ... ... //depot/projects/trustedbsd/mac/sys/kern/kern_descrip.c#14 edit Differences ... ==== //depot/projects/trustedbsd/mac/sys/kern/kern_descrip.c#14 (text+ko) ==== @@ -323,8 +323,11 @@ mode |= VWRITE; if (fflag & O_APPEND) mode |= VAPPEND; + vn_lock((struct vnode *)fp->f_data, LK_EXCLUSIVE | + LK_RETRY, td); error = mac_cred_check_open_vnode(td->td_ucred, (struct vnode *)fp->f_data, mode); + VOP_UNLOCK((struct vnode *)fp->f_data, 0, td); if (error) { fdrop(fp, td); break; 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?200204301906.g3UJ6R853857>