Date: Mon, 21 Jan 2008 16:39:24 GMT From: Robert Watson <rwatson@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 133793 for review Message-ID: <200801211639.m0LGdO7H055272@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=133793 Change 133793 by rwatson@rwatson_freebsd_capabilities on 2008/01/21 16:38:31 Use fget_locked() for getvnode/getvnode_cap, as in getsock. Affected files ... .. //depot/projects/trustedbsd/capabilities/src/sys/kern/vfs_syscalls.c#3 edit Differences ... ==== //depot/projects/trustedbsd/capabilities/src/sys/kern/vfs_syscalls.c#3 (text+ko) ==== @@ -121,8 +121,8 @@ error = EBADF; else { FILEDESC_SLOCK(fdp); - if ((u_int)fd >= fdp->fd_nfiles || - (fp = fdp->fd_ofiles[fd]) == NULL) + fp = fget_locked(fdp, fd); + if (fp == NULL) error = EBADF; else if (fp->f_vnode == NULL) { fp = NULL; @@ -155,10 +155,9 @@ return (EBADF); } FILEDESC_SLOCK(fdp); - if ((u_int)fd >= fdp->fd_nfiles || - (fp = fdp->fd_ofiles[fd]) == NULL) { + fp = fget_locked(fdp, fd); + if (fp == NULL) { error = EBADF; - fp = NULL; goto out; }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200801211639.m0LGdO7H055272>