| /freebsd-14-stable/sys/dev/veriexec/ |
| HD | verified_exec.c | 217 error = VOP_GETATTR(nid.ni_vp, &vattr, td->td_ucred); in verifiedexecioctl() 219 mac_veriexec_set_fingerprint_status(nid.ni_vp, in verifiedexecioctl() 221 VOP_UNLOCK(nid.ni_vp); in verifiedexecioctl() 222 (void) vn_close(nid.ni_vp, FREAD, td->td_ucred, in verifiedexecioctl() 231 if ((nid.ni_vp->v_mount->mnt_flag & in verifiedexecioctl() 241 mac_veriexec_set_fingerprint_status(nid.ni_vp, in verifiedexecioctl() 243 VOP_UNLOCK(nid.ni_vp); in verifiedexecioctl() 244 (void) vn_close(nid.ni_vp, FREAD, td->td_ucred, td); in verifiedexecioctl()
|
| /freebsd-14-stable/sys/kern/ |
| HD | vfs_lookup.c | 474 ndp->ni_vp = dp; in namei_emptypath() 486 SDT_PROBE4(vfs, namei, lookup, return, 0, ndp->ni_vp, false, ndp); in namei_emptypath() 515 error = mac_vnode_check_readlink(td->td_ucred, ndp->ni_vp); in namei_follow_link() 533 error = VOP_READLINK(ndp->ni_vp, &auio, cnp->cn_cred); in namei_follow_link() 630 ndp->ni_vp = NULL; in namei() 726 ndp->ni_vp, false, ndp); in namei() 735 vput(ndp->ni_vp); in namei() 756 vput(ndp->ni_vp); in namei() 757 ndp->ni_vp = NULL; in namei() 850 ndp->ni_vp = dp; in vfs_lookup_degenerate() [all …]
|
| HD | kern_ctf.c | 107 if ((error = vn_rdwr(UIO_READ, nd.ni_vp, hdr, sizeof(*hdr), in link_elf_ctf_get() 129 if ((error = vn_rdwr(UIO_READ, nd.ni_vp, (caddr_t)shdr, nbytes, in link_elf_ctf_get() 151 if ((error = vn_rdwr(UIO_READ, nd.ni_vp, shstrtab, in link_elf_ctf_get() 170 if ((error = vn_rdwr(UIO_READ, nd.ni_vp, &cth, sizeof(cth), in link_elf_ctf_get() 226 if ((error = vn_rdwr(UIO_READ, nd.ni_vp, raw == NULL ? ctftab : raw, in link_elf_ctf_get() 272 VOP_UNLOCK(nd.ni_vp); in link_elf_ctf_get() 273 vn_close(nd.ni_vp, FREAD, td->td_ucred, td); in link_elf_ctf_get()
|
| HD | vfs_extattr.c | 109 filename_vp = nd.ni_vp; in sys_extattrctl() 119 mp = nd.ni_vp->v_mount; in sys_extattrctl() 122 vput(nd.ni_vp); in sys_extattrctl() 127 VOP_UNLOCK(nd.ni_vp); in sys_extattrctl() 128 error = vn_start_write(nd.ni_vp, &mp_writable, V_WAIT | V_PCATCH); in sys_extattrctl() 129 vrele(nd.ni_vp); in sys_extattrctl() 333 error = extattr_set_vp(nd.ni_vp, attrnamespace, attrname, data, in kern_extattr_set_path() 336 vrele(nd.ni_vp); in kern_extattr_set_path() 519 error = extattr_get_vp(nd.ni_vp, attrnamespace, attrname, data, in kern_extattr_get_path() 522 vrele(nd.ni_vp); in kern_extattr_get_path() [all …]
|
| HD | vfs_syscalls.c | 208 mp = nd.ni_vp->v_mount; in sys_quotactl() 210 vput(nd.ni_vp); in sys_quotactl() 341 mp = vfs_ref_from_vp(nd.ni_vp); in kern_statfs() 342 vrele(nd.ni_vp); in kern_statfs() 957 if ((error = change_dir(nd.ni_vp, td)) != 0) { in kern_chdir() 958 vput(nd.ni_vp); in kern_chdir() 962 VOP_UNLOCK(nd.ni_vp); in kern_chdir() 964 pwd_chdir(td, nd.ni_vp); in kern_chdir() 1004 error = change_dir(nd.ni_vp, td); in sys_chroot() 1008 error = mac_vnode_check_chroot(td->td_ucred, nd.ni_vp); in sys_chroot() [all …]
|
| HD | kern_acct.c | 224 error = mac_system_check_acct(td->td_ucred, nd.ni_vp); in sys_acct() 226 VOP_UNLOCK(nd.ni_vp); in sys_acct() 227 vn_close(nd.ni_vp, flags, td->td_ucred, td); in sys_acct() 231 VOP_UNLOCK(nd.ni_vp); in sys_acct() 232 if (nd.ni_vp->v_type != VREG) { in sys_acct() 233 vn_close(nd.ni_vp, flags, td->td_ucred, td); in sys_acct() 279 acct_vp = nd.ni_vp; in sys_acct()
|
| HD | subr_firmware.c | 304 if (nd.ni_vp->v_type != VREG) in try_binary_file() 306 error = VOP_GETATTR(nd.ni_vp, &vattr, cred); in try_binary_file() 319 error = vn_rdwr(UIO_READ, nd.ni_vp, (caddr_t)data, vattr.va_size, 0, in try_binary_file() 322 VOP_UNLOCK(nd.ni_vp); in try_binary_file() 323 vn_close(nd.ni_vp, FREAD, cred, td); in try_binary_file() 324 nd.ni_vp = NULL; in try_binary_file() 338 VOP_UNLOCK(nd.ni_vp); in try_binary_file() 339 vn_close(nd.ni_vp, FREAD, cred, td); in try_binary_file()
|
| HD | vfs_acl.c | 380 error = vacl_get_acl(td, nd.ni_vp, type, aclp); in kern___acl_get_path() 381 vrele(nd.ni_vp); in kern___acl_get_path() 419 error = vacl_set_acl(td, nd.ni_vp, type, aclp); in kern___acl_set_path() 420 vrele(nd.ni_vp); in kern___acl_set_path() 496 error = vacl_delete(td, nd.ni_vp, type); in kern___acl_delete_path() 497 vrele(nd.ni_vp); in kern___acl_delete_path() 554 error = vacl_aclcheck(td, nd.ni_vp, type, aclp); in kern___acl_aclcheck_path() 555 vrele(nd.ni_vp); in kern___acl_aclcheck_path()
|
| HD | link_elf_obj.c | 749 if (nd->ni_vp->v_type != VREG) { in link_elf_load_file() 754 error = mac_kld_check_load(td->td_ucred, nd->ni_vp); in link_elf_load_file() 762 error = vn_rdwr(UIO_READ, nd->ni_vp, (void *)hdr, sizeof(*hdr), 0, in link_elf_load_file() 819 error = vn_rdwr(UIO_READ, nd->ni_vp, (caddr_t)shdr, nbytes, in link_elf_load_file() 909 error = vn_rdwr(UIO_READ, nd->ni_vp, (void *)ef->ddbsymtab, in link_elf_load_file() 923 error = vn_rdwr(UIO_READ, nd->ni_vp, ef->ddbstrtab, in link_elf_load_file() 942 error = vn_rdwr(UIO_READ, nd->ni_vp, ef->shstrtab, in link_elf_load_file() 1129 error = vn_rdwr(UIO_READ, nd->ni_vp, in link_elf_load_file() 1172 error = vn_rdwr(UIO_READ, nd->ni_vp, in link_elf_load_file() 1193 error = vn_rdwr(UIO_READ, nd->ni_vp, in link_elf_load_file() [all …]
|
| HD | kern_linker.c | 1903 type = nd.ni_vp->v_type; in linker_lookup_file() 1905 VOP_GETATTR(nd.ni_vp, vap, td->td_ucred); in linker_lookup_file() 1906 VOP_UNLOCK(nd.ni_vp); in linker_lookup_file() 1907 vn_close(nd.ni_vp, FREAD, td->td_ucred, td); in linker_lookup_file() 1954 if (nd.ni_vp->v_type != VREG) in linker_hints_lookup() 1957 error = VOP_GETATTR(nd.ni_vp, &vattr, cred); in linker_hints_lookup() 1972 error = vn_rdwr(UIO_READ, nd.ni_vp, (caddr_t)hints, vattr.va_size, 0, in linker_hints_lookup() 1976 VOP_UNLOCK(nd.ni_vp); in linker_hints_lookup() 1977 vn_close(nd.ni_vp, FREAD, cred, td); in linker_hints_lookup() 1978 nd.ni_vp = NULL; in linker_hints_lookup() [all …]
|
| HD | vfs_mountroot.c | 360 vp = nd.ni_vp; in vfs_mountroot_shuffle() 388 vp = nd.ni_vp; in vfs_mountroot_shuffle() 728 vrele(nd.ni_vp); in parse_mount_dev_present() 958 error = vn_rdwr(UIO_READ, nd.ni_vp, buf, len, ofs, in vfs_mountroot_readconf() 970 VOP_UNLOCK(nd.ni_vp); in vfs_mountroot_readconf() 971 vn_close(nd.ni_vp, FREAD, td->td_ucred, td); in vfs_mountroot_readconf()
|
| HD | link_elf.c | 1005 if (nd.ni_vp->v_type != VREG) { in link_elf_load_file() 1011 error = mac_kld_check_load(curthread->td_ucred, nd.ni_vp); in link_elf_load_file() 1023 error = vn_rdwr(UIO_READ, nd.ni_vp, firstpage, PAGE_SIZE, 0, in link_elf_load_file() 1186 error = vn_rdwr(UIO_READ, nd.ni_vp, in link_elf_load_file() 1214 VOP_UNLOCK(nd.ni_vp); in link_elf_load_file() 1216 vn_lock(nd.ni_vp, LK_EXCLUSIVE | LK_RETRY); in link_elf_load_file() 1259 error = vn_rdwr(UIO_READ, nd.ni_vp, in link_elf_load_file() 1272 error = vn_rdwr(UIO_READ, nd.ni_vp, (caddr_t)shstrs, nbytes, in link_elf_load_file() 1300 error = vn_rdwr(UIO_READ, nd.ni_vp, in link_elf_load_file() 1306 error = vn_rdwr(UIO_READ, nd.ni_vp, in link_elf_load_file() [all …]
|
| /freebsd-14-stable/sys/security/mac_veriexec_parser/ |
| HD | mac_veriexec_parser.c | 271 rc = VOP_GETATTR(nid.ni_vp, &va, curthread->td_ucred); in read_manifest() 279 UIO_READ, nid.ni_vp, data, in read_manifest() 291 VOP_UNLOCK(nid.ni_vp); in read_manifest() 292 (void)vn_close(nid.ni_vp, FREAD, curthread->td_ucred, curthread); in read_manifest() 354 rc = VOP_GETATTR(nid.ni_vp, &va, curthread->td_ucred); in parse_entry() 370 VOP_UNLOCK(nid.ni_vp); in parse_entry() 371 vn_close(nid.ni_vp, FREAD, curthread->td_ucred, curthread); in parse_entry()
|
| /freebsd-14-stable/sys/dev/beri/virtio/ |
| HD | virtio_block.c | 248 if (nd.ni_vp->v_type != VREG) { in open_file() 252 error = VOP_GETATTR(nd.ni_vp, &vattr, td->td_ucred); in open_file() 256 if (VOP_ISLOCKED(nd.ni_vp) != LK_EXCLUSIVE) { in open_file() 257 vn_lock(nd.ni_vp, LK_UPGRADE | LK_RETRY); in open_file() 258 if (VN_IS_DOOMED(nd.ni_vp)) { in open_file() 262 nd.ni_vp->v_vflag |= VV_MD; in open_file() 263 VOP_UNLOCK(nd.ni_vp); in open_file() 265 sc->vnode = nd.ni_vp; in open_file()
|
| /freebsd-14-stable/sys/security/mac_veriexec/ |
| HD | mac_veriexec.c | 857 nd.ni_vp = NULL; in mac_veriexec_syscall() 942 error = mac_veriexec_check_vp(td->td_ucred, nd.ni_vp, VVERIFY); in mac_veriexec_syscall() 967 textvp = nd.ni_vp; in mac_veriexec_syscall() 1012 if (nd.ni_vp != NULL) { in mac_veriexec_syscall() 1013 VOP_UNLOCK(nd.ni_vp); in mac_veriexec_syscall() 1014 vn_close(nd.ni_vp, FREAD, td->td_ucred, td); in mac_veriexec_syscall()
|
| /freebsd-14-stable/sys/fs/nfsserver/ |
| HD | nfs_nfsdport.c | 736 if (ndp->ni_vp && !lockleaf) in nfsvno_namei() 737 NFSVOPUNLOCK(ndp->ni_vp); in nfsvno_namei() 768 error = VOP_READLINK(ndp->ni_vp, &auio, cnp->cn_cred); in nfsvno_namei() 775 vput(ndp->ni_vp); in nfsvno_namei() 806 vput(ndp->ni_vp); in nfsvno_namei() 807 ndp->ni_vp = NULL; in nfsvno_namei() 823 ndp->ni_vp = NULL; in nfsvno_namei() 1219 if (!error && ndp->ni_vp == NULL) { in nfsvno_createsub() 1222 &ndp->ni_vp, &ndp->ni_cnd, &nvap->na_vattr); in nfsvno_createsub() 1230 nfsrv_pnfscreate(ndp->ni_vp, &nvap->na_vattr, in nfsvno_createsub() [all …]
|
| HD | nfs_nfsdstate.c | 7727 if (nd.ni_vp->v_type != VDIR) { in nfsrv_setdsserver() 7728 vput(nd.ni_vp); in nfsrv_setdsserver() 7732 if (strcmp(nd.ni_vp->v_mount->mnt_vfc->vfc_name, "nfs") != 0) { in nfsrv_setdsserver() 7733 vput(nd.ni_vp); in nfsrv_setdsserver() 7748 ds->nfsdev_dvp = nd.ni_vp; in nfsrv_setdsserver() 7749 ds->nfsdev_nmp = VFSTONFS(nd.ni_vp->v_mount); in nfsrv_setdsserver() 7750 NFSVOPUNLOCK(nd.ni_vp); in nfsrv_setdsserver() 7763 if (nd.ni_vp->v_type != VDIR) { in nfsrv_setdsserver() 7764 vput(nd.ni_vp); in nfsrv_setdsserver() 7769 if (strcmp(nd.ni_vp->v_mount->mnt_vfc->vfc_name, "nfs") != 0) { in nfsrv_setdsserver() [all …]
|
| /freebsd-14-stable/sys/security/mac/ |
| HD | mac_syscalls.c | 469 mac_vnode_copy_label(nd.ni_vp->v_label, intlabel); in kern___mac_get_path() 472 vput(nd.ni_vp); in kern___mac_get_path() 616 error = vn_start_write(nd.ni_vp, &mp, V_WAIT | V_PCATCH); in kern___mac_set_path() 618 error = vn_setlabel(nd.ni_vp, intlabel, in kern___mac_set_path() 622 vput(nd.ni_vp); in kern___mac_set_path()
|
| /freebsd-14-stable/sys/dev/md/ |
| HD | md.c | 1451 if (nd.ni_vp->v_type != VREG) { in mdcreate_vnode() 1455 error = VOP_GETATTR(nd.ni_vp, &vattr, td->td_ucred); in mdcreate_vnode() 1459 error = VOP_PATHCONF(nd.ni_vp, _PC_DEALLOC_PRESENT, &v); in mdcreate_vnode() 1465 if (VOP_ISLOCKED(nd.ni_vp) != LK_EXCLUSIVE) { in mdcreate_vnode() 1466 vn_lock(nd.ni_vp, LK_UPGRADE | LK_RETRY); in mdcreate_vnode() 1467 if (VN_IS_DOOMED(nd.ni_vp)) { in mdcreate_vnode() 1473 nd.ni_vp->v_vflag |= VV_MD; in mdcreate_vnode() 1474 VOP_UNLOCK(nd.ni_vp); in mdcreate_vnode() 1486 sc->vnode = nd.ni_vp; in mdcreate_vnode() 1491 vn_lock(nd.ni_vp, LK_EXCLUSIVE | LK_RETRY); in mdcreate_vnode() [all …]
|
| /freebsd-14-stable/sys/compat/linux/ |
| HD | linux_util.c | 92 pwd_altroot(td, nd.ni_vp); in linux_pwd_onexec() 93 vrele(nd.ni_vp); in linux_pwd_onexec()
|
| HD | linux_stats.c | 109 error = VOP_STAT(nd.ni_vp, sbp, td->td_ucred, NOCRED); in linux_kern_statat() 111 translate_vnhook_major_minor(nd.ni_vp, sbp); in linux_kern_statat() 113 vput(nd.ni_vp); in linux_kern_statat()
|
| /freebsd-14-stable/sys/ufs/ffs/ |
| HD | ffs_vfsops.c | 452 if (!vn_isdisk_error(ndp.ni_vp, &error)) { in ffs_mount() 453 vput(ndp.ni_vp); in ffs_mount() 464 error = VOP_ACCESS(ndp.ni_vp, accmode, td->td_ucred, td); in ffs_mount() 468 vput(ndp.ni_vp); in ffs_mount() 481 if ((error = ffs_mountfs(ndp.ni_vp, mp, td)) != 0) { in ffs_mount() 482 vrele(ndp.ni_vp); in ffs_mount() 499 if (ndp.ni_vp->v_rdev != ump->um_odevvp->v_rdev) in ffs_mount() 501 vput(ndp.ni_vp); in ffs_mount()
|
| HD | ffs_snapshot.c | 260 if (nd.ni_vp != NULL) { in ffs_snapshot() 261 vput(nd.ni_vp); in ffs_snapshot() 268 if (nd.ni_dvp == nd.ni_vp) in ffs_snapshot() 291 error = VOP_CREATE(nd.ni_dvp, &nd.ni_vp, &nd.ni_cnd, &vat); in ffs_snapshot() 300 vp = nd.ni_vp; in ffs_snapshot() 307 vnode_create_vobject(nd.ni_vp, fs->fs_size, td); in ffs_snapshot() 896 (rmerr = VOP_REMOVE(nd.ni_dvp, nd.ni_vp, &nd.ni_cnd)) != 0) in ffs_snapshot() 902 if (nd.ni_vp != NULL) in ffs_snapshot() 903 vput(nd.ni_vp); in ffs_snapshot()
|
| /freebsd-14-stable/sys/sys/ |
| HD | namei.h | 89 struct vnode *ni_vp; /* vnode of result */ member
|
| /freebsd-14-stable/sys/fs/nfsclient/ |
| HD | nfs_clport.c | 1338 if (error == 0 && strcmp(nd.ni_vp->v_mount->mnt_vfc->vfc_name, in nfssvc_nfscl() 1340 vput(nd.ni_vp); in nfssvc_nfscl() 1346 nfscl_retopts(VFSTONFS(nd.ni_vp->v_mount), buf, in nfssvc_nfscl() 1348 vput(nd.ni_vp); in nfssvc_nfscl()
|