diff options
| author | 2006-11-29 12:24:15 +0000 | |
|---|---|---|
| committer | 2006-11-29 12:24:15 +0000 | |
| commit | 46718002fd92ad6071bc17d0a8671800e19e703e (patch) | |
| tree | c3e4d563248952d16989ab42dacbccaf45ff4422 /sys/kern/sched_bsd.c | |
| parent | Add an alignment parameter to uvm_km_alloc1(), and change all callers to (diff) | |
| download | wireguard-openbsd-46718002fd92ad6071bc17d0a8671800e19e703e.tar.xz wireguard-openbsd-46718002fd92ad6071bc17d0a8671800e19e703e.zip | |
Kernel stack can be swapped. This means that stuff that's on the stack
should never be referenced outside the context of the process to which
this stack belongs unless we do the PHOLD/PRELE dance. Loads of code
doesn't follow the rules here. Instead of trying to track down all
offenders and fix this hairy situation, it makes much more sense
to not swap kernel stacks.
From art@, tested by many some time ago.
Diffstat (limited to 'sys/kern/sched_bsd.c')
| -rw-r--r-- | sys/kern/sched_bsd.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/sys/kern/sched_bsd.c b/sys/kern/sched_bsd.c index 45c76eb7a3a..a62c5248b86 100644 --- a/sys/kern/sched_bsd.c +++ b/sys/kern/sched_bsd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sched_bsd.c,v 1.8 2006/11/15 17:25:40 jmc Exp $ */ +/* $OpenBSD: sched_bsd.c,v 1.9 2006/11/29 12:24:18 miod Exp $ */ /* $NetBSD: kern_synch.c,v 1.37 1996/04/22 01:38:37 christos Exp $ */ /*- @@ -310,7 +310,6 @@ schedcpu(void *arg) if (p->p_priority >= PUSER) { if ((p != curproc) && p->p_stat == SRUN && - (p->p_flag & P_INMEM) && (p->p_priority / PPQ) != (p->p_usrpri / PPQ)) { remrunqueue(p); p->p_priority = p->p_usrpri; @@ -618,15 +617,11 @@ setrunnable(struct proc *p) break; } p->p_stat = SRUN; - if (p->p_flag & P_INMEM) - setrunqueue(p); + setrunqueue(p); if (p->p_slptime > 1) updatepri(p); p->p_slptime = 0; - if ((p->p_flag & P_INMEM) == 0) - wakeup(&proc0); - else - resched_proc(p, p->p_priority); + resched_proc(p, p->p_priority); } /* |
