imgact_elf.c (71699) | imgact_elf.c (72200) |
---|---|
1/*- 2 * Copyright (c) 1995-1996 S�ren Schmidt 3 * Copyright (c) 1996 Peter Wemm 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 12 unchanged lines hidden (view full) --- 21 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 22 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 23 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 24 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 27 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * | 1/*- 2 * Copyright (c) 1995-1996 S�ren Schmidt 3 * Copyright (c) 1996 Peter Wemm 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 12 unchanged lines hidden (view full) --- 21 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 22 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 23 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 24 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 27 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * |
29 * $FreeBSD: head/sys/kern/imgact_elf.c 71699 2001-01-27 00:01:31Z jhb $ | 29 * $FreeBSD: head/sys/kern/imgact_elf.c 72200 2001-02-09 06:11:45Z bmilekic $ |
30 */ 31 32#include "opt_rlimit.h" 33 34#include <sys/param.h> 35#include <sys/exec.h> 36#include <sys/fcntl.h> 37#include <sys/imgact.h> --- 442 unchanged lines hidden (view full) --- 480 */ 481 482 /* 483 * Yeah, I'm paranoid. There is every reason in the world to get 484 * VTEXT now since from here on out, there are places we can have 485 * a context switch. Better safe than sorry; I really don't want 486 * the file to change while it's being loaded. 487 */ | 30 */ 31 32#include "opt_rlimit.h" 33 34#include <sys/param.h> 35#include <sys/exec.h> 36#include <sys/fcntl.h> 37#include <sys/imgact.h> --- 442 unchanged lines hidden (view full) --- 480 */ 481 482 /* 483 * Yeah, I'm paranoid. There is every reason in the world to get 484 * VTEXT now since from here on out, there are places we can have 485 * a context switch. Better safe than sorry; I really don't want 486 * the file to change while it's being loaded. 487 */ |
488 mtx_enter(&imgp->vp->v_interlock, MTX_DEF); | 488 mtx_lock(&imgp->vp->v_interlock); |
489 imgp->vp->v_flag |= VTEXT; | 489 imgp->vp->v_flag |= VTEXT; |
490 mtx_exit(&imgp->vp->v_interlock, MTX_DEF); | 490 mtx_unlock(&imgp->vp->v_interlock); |
491 492 if ((error = exec_extract_strings(imgp)) != 0) 493 goto fail; 494 495 exec_new_vmspace(imgp); 496 497 vmspace = imgp->proc->p_vmspace; 498 --- 533 unchanged lines hidden --- | 491 492 if ((error = exec_extract_strings(imgp)) != 0) 493 goto fail; 494 495 exec_new_vmspace(imgp); 496 497 vmspace = imgp->proc->p_vmspace; 498 --- 533 unchanged lines hidden --- |