diff options
author | peter <peter@FreeBSD.org> | 1997-09-21 03:13:21 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 1997-09-21 03:13:21 +0000 |
commit | 0a5b22bdab36709f0deb563f46e28530ad02ebcd (patch) | |
tree | d05a47d5946ecfb14432d8bd48aaf6049fbb3898 /sys | |
parent | 27ed0084e02fcc3d4859c63bb642fda3ecc49f65 (diff) | |
download | FreeBSD-src-0a5b22bdab36709f0deb563f46e28530ad02ebcd.zip FreeBSD-src-0a5b22bdab36709f0deb563f46e28530ad02ebcd.tar.gz |
We were (I think) missing a vrele() on the vnode for the object loaded
via PT_INTERP (usually /usr/libexec/ld-elf.so.1).
Diffstat (limited to 'sys')
-rw-r--r-- | sys/kern/imgact_elf.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/sys/kern/imgact_elf.c b/sys/kern/imgact_elf.c index 706ce37..a65f836 100644 --- a/sys/kern/imgact_elf.c +++ b/sys/kern/imgact_elf.c @@ -26,7 +26,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: imgact_elf.c,v 1.18 1997/04/01 10:41:48 bde Exp $ + * $Id: imgact_elf.c,v 1.19 1997/04/13 01:48:21 dyson Exp $ */ #include "opt_rlimit.h" @@ -338,11 +338,8 @@ elf_load_file(struct proc *p, char *file, u_long *addr, u_long *entry) NDINIT(&nd, LOOKUP, LOCKLEAF|FOLLOW, UIO_SYSSPACE, file, p); - if (error = namei(&nd)) - goto fail; - - if (nd.ni_vp == NULL) { - error = ENOEXEC; + if (error = namei(&nd)) { + nd.ni_vp = NULL; goto fail; } @@ -460,6 +457,8 @@ fail: unmap_pages((vm_offset_t)phdr, header_size); if (hdr) unmap_pages((vm_offset_t)hdr, sizeof(hdr)); + if (nd.ni_vp) + vrele(nd.ni_vp); return error; } |