Date: Sun, 11 Jan 2004 13:34:28 -0800 (PST) From: Robert Watson <rwatson@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 45171 for review Message-ID: <200401112134.i0BLYSOL005787@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=45171 Change 45171 by rwatson@rwatson_paprika on 2004/01/11 13:33:55 Use vn_fullpath_thread() since these calls to vn_fullpath() are done in the context of a process. Affected files ... .. //depot/projects/trustedbsd/audit2/sys/compat/linprocfs/linprocfs.c#2 edit .. //depot/projects/trustedbsd/audit2/sys/fs/procfs/procfs.c#2 edit .. //depot/projects/trustedbsd/audit2/sys/fs/procfs/procfs_map.c#2 edit Differences ... ==== //depot/projects/trustedbsd/audit2/sys/compat/linprocfs/linprocfs.c#2 (text+ko) ==== @@ -355,7 +355,8 @@ /* resolve symlinks etc. in the emulation tree prefix */ NDINIT(&nd, LOOKUP, FOLLOW, UIO_SYSSPACE, linux_emul_path, td); flep = NULL; - if (namei(&nd) != 0 || vn_fullpath(td, nd.ni_vp, &dlep, &flep) == -1) + if (namei(&nd) != 0 || vn_fullpath_thread(td, nd.ni_vp, &dlep, &flep) + == -1) lep = linux_emul_path; else lep = dlep; @@ -739,7 +740,7 @@ char *fullpath = "unknown"; char *freepath = NULL; - vn_fullpath(td, p->p_fd->fd_cdir, &fullpath, &freepath); + vn_fullpath_thread(td, p->p_fd->fd_cdir, &fullpath, &freepath); sbuf_printf(sb, "%s", fullpath); if (freepath) free(freepath, M_TEMP); @@ -757,7 +758,7 @@ char *freepath = NULL; rvp = jailed(p->p_ucred) ? p->p_fd->fd_jdir : p->p_fd->fd_rdir; - vn_fullpath(td, rvp, &fullpath, &freepath); + vn_fullpath_thread(td, rvp, &fullpath, &freepath); sbuf_printf(sb, "%s", fullpath); if (freepath) free(freepath, M_TEMP); @@ -863,8 +864,9 @@ VM_OBJECT_LOCK(lobj); off = IDX_TO_OFF(lobj->size); if (lobj->type == OBJT_VNODE && lobj->handle) { - vn_fullpath(td, (struct vnode *)lobj->handle, - &name, &freename); + vn_fullpath_thread(td, + (struct vnode *)lobj->handle, &name, + &freename); ino = ((struct vnode *) lobj->handle)->v_cachedid; } ==== //depot/projects/trustedbsd/audit2/sys/fs/procfs/procfs.c#2 (text+ko) ==== @@ -70,7 +70,7 @@ char *fullpath = "unknown"; char *freepath = NULL; - vn_fullpath(td, p->p_textvp, &fullpath, &freepath); + vn_fullpath_thread(td, p->p_textvp, &fullpath, &freepath); sbuf_printf(sb, "%s", fullpath); if (freepath) free(freepath, M_TEMP); ==== //depot/projects/trustedbsd/audit2/sys/fs/procfs/procfs_map.c#2 (text+ko) ==== @@ -138,7 +138,7 @@ break; case OBJT_VNODE: type = "vnode"; - vn_fullpath(td, + vn_fullpath_thread(td, (struct vnode *)lobj->handle, &fullpath, &freepath);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200401112134.i0BLYSOL005787>