mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
Initialize p_md.md_kernnest to 1 for newly fork'd processes since they
start off in the kernel.
This commit is contained in:
parent
21aaa49c89
commit
bf4c03d0e9
3 changed files with 18 additions and 0 deletions
|
|
@ -208,6 +208,12 @@ cpu_fork(p1, p2, flags)
|
|||
up->u_pcb.pcb_context[2] = (u_long) p2; /* s2: a1 */
|
||||
up->u_pcb.pcb_context[7] =
|
||||
(u_int64_t)fork_trampoline; /* ra: assembly magic */
|
||||
#ifdef SMP
|
||||
/*
|
||||
* We start off at a nesting level of 1 within the kernel.
|
||||
*/
|
||||
p2->p_md.md_kernnest = 1;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -208,6 +208,12 @@ cpu_fork(p1, p2, flags)
|
|||
up->u_pcb.pcb_context[2] = (u_long) p2; /* s2: a1 */
|
||||
up->u_pcb.pcb_context[7] =
|
||||
(u_int64_t)fork_trampoline; /* ra: assembly magic */
|
||||
#ifdef SMP
|
||||
/*
|
||||
* We start off at a nesting level of 1 within the kernel.
|
||||
*/
|
||||
p2->p_md.md_kernnest = 1;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -208,6 +208,12 @@ cpu_fork(p1, p2, flags)
|
|||
up->u_pcb.pcb_context[2] = (u_long) p2; /* s2: a1 */
|
||||
up->u_pcb.pcb_context[7] =
|
||||
(u_int64_t)fork_trampoline; /* ra: assembly magic */
|
||||
#ifdef SMP
|
||||
/*
|
||||
* We start off at a nesting level of 1 within the kernel.
|
||||
*/
|
||||
p2->p_md.md_kernnest = 1;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue