Don't hold sched_lock across addupc_task().

Reported by:	David Taylor <davidt@yadt.co.uk>
Submitted by:	bde
This commit is contained in:
John Baldwin 2001-06-06 00:57:24 +00:00
parent ca604d262f
commit 262c9f8a3b
5 changed files with 5 additions and 5 deletions

View File

@ -900,9 +900,9 @@ ast(framep)
p->p_sflag &= ~PS_OWEUPC;
mtx_unlock_spin(&sched_lock);
mtx_lock(&Giant);
mtx_lock_spin(&sched_lock); /* XXX */
addupc_task(p, p->p_stats->p_prof.pr_addr,
p->p_stats->p_prof.pr_ticks);
mtx_lock_spin(&sched_lock);
}
if (p->p_sflag & PS_ALRMPEND) {
p->p_sflag &= ~PS_ALRMPEND;

View File

@ -1283,9 +1283,9 @@ ast(framep)
p->p_sflag &= ~PS_OWEUPC;
mtx_unlock_spin(&sched_lock);
mtx_lock(&Giant);
mtx_lock_spin(&sched_lock);
addupc_task(p, p->p_stats->p_prof.pr_addr,
p->p_stats->p_prof.pr_ticks);
mtx_lock_spin(&sched_lock);
}
if (p->p_sflag & PS_ALRMPEND) {
p->p_sflag &= ~PS_ALRMPEND;

View File

@ -1283,9 +1283,9 @@ ast(framep)
p->p_sflag &= ~PS_OWEUPC;
mtx_unlock_spin(&sched_lock);
mtx_lock(&Giant);
mtx_lock_spin(&sched_lock);
addupc_task(p, p->p_stats->p_prof.pr_addr,
p->p_stats->p_prof.pr_ticks);
mtx_lock_spin(&sched_lock);
}
if (p->p_sflag & PS_ALRMPEND) {
p->p_sflag &= ~PS_ALRMPEND;

View File

@ -641,9 +641,9 @@ ast(framep)
p->p_sflag &= ~PS_OWEUPC;
mtx_unlock_spin(&sched_lock);
mtx_lock(&Giant);
mtx_lock_spin(&sched_lock);
addupc_task(p, p->p_stats->p_prof.pr_addr,
p->p_stats->p_prof.pr_ticks);
mtx_lock_spin(&sched_lock);
}
if (p->p_sflag & PS_ALRMPEND) {
p->p_sflag &= ~PS_ALRMPEND;

View File

@ -1283,9 +1283,9 @@ ast(framep)
p->p_sflag &= ~PS_OWEUPC;
mtx_unlock_spin(&sched_lock);
mtx_lock(&Giant);
mtx_lock_spin(&sched_lock);
addupc_task(p, p->p_stats->p_prof.pr_addr,
p->p_stats->p_prof.pr_ticks);
mtx_lock_spin(&sched_lock);
}
if (p->p_sflag & PS_ALRMPEND) {
p->p_sflag &= ~PS_ALRMPEND;