Date: Mon, 7 Nov 2005 15:29:28 GMT From: Todd Miller <millert@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 86420 for review Message-ID: <200511071529.jA7FTSHU096843@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=86420 Change 86420 by millert@millert_ibook on 2005/11/07 15:29:26 Don't try to deref curproc if it is NULL Affected files ... .. //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/avc/avc.c#7 edit Differences ... ==== //depot/projects/trustedbsd/sedarwin7/src/sedarwin/sedarwin/avc/avc.c#7 (text+ko) ==== @@ -555,9 +555,10 @@ struct av_decision *avd, int result, struct avc_audit_data *a) { #ifdef __APPLE__ - struct proc *curproc = current_proc(); + struct proc *tsk = current_proc(); +#else + struct proc *tsk = curproc; #endif - struct proc *tsk = curproc; access_vector_t denied, audited; denied = requested & ~avd->allowed; @@ -608,11 +609,10 @@ struct vnode *vp = a->u.fs.vp; struct vattr va; #ifdef __APPLE__ - struct proc *curproc = current_proc(); - if (/*VOP_ISLOCKED(vp) &&*/ + if (tsk && /*VOP_ISLOCKED(vp) &&*/ !VOP_GETATTR(vp, &va, - curproc->p_ucred, - curproc)) { + tsk->p_ucred, + tsk)) { #else if (VOP_ISLOCKED(vp, curthread) && !VOP_GETATTR(vp, &va,
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200511071529.jA7FTSHU096843>