kern_fork.c (184042) | kern_fork.c (185435) |
---|---|
1/*- 2 * Copyright (c) 1982, 1986, 1989, 1991, 1993 3 * The Regents of the University of California. All rights reserved. 4 * (c) UNIX System Laboratories, Inc. 5 * All or some portions of this file are derived from material licensed 6 * to the University of California by American Telephone and Telegraph 7 * Co. or Unix System Laboratories, Inc. and are reproduced herein with 8 * the permission of UNIX System Laboratories, Inc. --- 21 unchanged lines hidden (view full) --- 30 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 31 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 32 * SUCH DAMAGE. 33 * 34 * @(#)kern_fork.c 8.6 (Berkeley) 4/8/94 35 */ 36 37#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 1982, 1986, 1989, 1991, 1993 3 * The Regents of the University of California. All rights reserved. 4 * (c) UNIX System Laboratories, Inc. 5 * All or some portions of this file are derived from material licensed 6 * to the University of California by American Telephone and Telegraph 7 * Co. or Unix System Laboratories, Inc. and are reproduced herein with 8 * the permission of UNIX System Laboratories, Inc. --- 21 unchanged lines hidden (view full) --- 30 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 31 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 32 * SUCH DAMAGE. 33 * 34 * @(#)kern_fork.c 8.6 (Berkeley) 4/8/94 35 */ 36 37#include <sys/cdefs.h> |
38__FBSDID("$FreeBSD: head/sys/kern/kern_fork.c 184042 2008-10-19 01:35:27Z kmacy $"); | 38__FBSDID("$FreeBSD: head/sys/kern/kern_fork.c 185435 2008-11-29 14:32:14Z bz $"); |
39 40#include "opt_kdtrace.h" 41#include "opt_ktrace.h" 42#include "opt_mac.h" 43 44#include <sys/param.h> 45#include <sys/systm.h> 46#include <sys/sysproto.h> 47#include <sys/eventhandler.h> 48#include <sys/filedesc.h> 49#include <sys/kernel.h> 50#include <sys/kthread.h> 51#include <sys/sysctl.h> 52#include <sys/lock.h> 53#include <sys/malloc.h> 54#include <sys/mutex.h> 55#include <sys/priv.h> 56#include <sys/proc.h> | 39 40#include "opt_kdtrace.h" 41#include "opt_ktrace.h" 42#include "opt_mac.h" 43 44#include <sys/param.h> 45#include <sys/systm.h> 46#include <sys/sysproto.h> 47#include <sys/eventhandler.h> 48#include <sys/filedesc.h> 49#include <sys/kernel.h> 50#include <sys/kthread.h> 51#include <sys/sysctl.h> 52#include <sys/lock.h> 53#include <sys/malloc.h> 54#include <sys/mutex.h> 55#include <sys/priv.h> 56#include <sys/proc.h> |
57#include <sys/jail.h> |
|
57#include <sys/pioctl.h> 58#include <sys/resourcevar.h> 59#include <sys/sched.h> 60#include <sys/syscall.h> 61#include <sys/vmmeter.h> 62#include <sys/vnode.h> 63#include <sys/acct.h> 64#include <sys/ktr.h> --- 382 unchanged lines hidden (view full) --- 447 __rangeof(struct proc, p_startcopy, p_endcopy)); 448 pargs_hold(p2->p_args); 449 PROC_UNLOCK(p1); 450 451 bzero(&p2->p_startzero, 452 __rangeof(struct proc, p_startzero, p_endzero)); 453 454 p2->p_ucred = crhold(td->td_ucred); | 58#include <sys/pioctl.h> 59#include <sys/resourcevar.h> 60#include <sys/sched.h> 61#include <sys/syscall.h> 62#include <sys/vmmeter.h> 63#include <sys/vnode.h> 64#include <sys/acct.h> 65#include <sys/ktr.h> --- 382 unchanged lines hidden (view full) --- 448 __rangeof(struct proc, p_startcopy, p_endcopy)); 449 pargs_hold(p2->p_args); 450 PROC_UNLOCK(p1); 451 452 bzero(&p2->p_startzero, 453 __rangeof(struct proc, p_startzero, p_endzero)); 454 455 p2->p_ucred = crhold(td->td_ucred); |
456 457 /* In case we are jailed tell the prison that we exist. */ 458 if (jailed(p2->p_ucred)) 459 prison_proc_hold(p2->p_ucred->cr_prison); 460 |
|
455 PROC_UNLOCK(p2); 456 457 /* 458 * Malloc things while we don't hold any locks. 459 */ 460 if (flags & RFSIGSHARE) 461 newsigacts = NULL; 462 else --- 387 unchanged lines hidden --- | 461 PROC_UNLOCK(p2); 462 463 /* 464 * Malloc things while we don't hold any locks. 465 */ 466 if (flags & RFSIGSHARE) 467 newsigacts = NULL; 468 else --- 387 unchanged lines hidden --- |