> Here is a larger patch: > > Index: kern/kern_ktrace.c > =================================================================== > --- kern/kern_ktrace.c (revision 220190) > +++ kern/kern_ktrace.c (working copy) > _at__at_ -882,7 +882,8 @@ > nfound = 0; > LIST_FOREACH(p, &pg->pg_members, p_pglist) { > PROC_LOCK(p); > - if (p_cansee(td, p) != 0) { > + if (p->p_state == PRS_NEW || > + p_cansee(td, p) != 0) { > PROC_UNLOCK(p); > continue; > } > Index: kern/kern_sig.c > =================================================================== > --- kern/kern_sig.c (revision 220190) > +++ kern/kern_sig.c (working copy) > _at__at_ -1799,7 +1799,8 _at__at_ > PGRP_LOCK_ASSERT(pgrp, MA_OWNED); > LIST_FOREACH(p, &pgrp->pg_members, p_pglist) { > PROC_LOCK(p); > - if (checkctty == 0 || p->p_flag & P_CONTROLT) > + if (p->p_state == PRS_NORMAL && > + (checkctty == 0 || p->p_flag & P_CONTROLT)) > pksignal(p, sig, ksi); > PROC_UNLOCK(p); > } > _at__at_ -3313,7 +3314,8 _at__at_ > PGRP_LOCK(sigio->sio_pgrp); > LIST_FOREACH(p, &sigio->sio_pgrp->pg_members, p_pglist) { > PROC_LOCK(p); > - if (CANSIGIO(sigio->sio_ucred, p->p_ucred) && > + if (p->p_state == PRS_NORMAL && > + CANSIGIO(sigio->sio_ucred, p->p_ucred) && > (checkctty == 0 || (p->p_flag & P_CONTROLT))) > psignal(p, sig); > PROC_UNLOCK(p); > Index: kern/kern_clock.c > =================================================================== > --- kern/kern_clock.c (revision 220190) > +++ kern/kern_clock.c (working copy) > _at__at_ -201,6 +201,10 _at__at_ > tryl = 0; > FOREACH_PROC_IN_SYSTEM(p) { > PROC_LOCK(p); > + if (p->p_state == PRS_NEW) { > + PROC_UNLOCK(p); > + continue; > + } > FOREACH_THREAD_IN_PROC(p, td) { > > /* > Index: kern/sched_4bsd.c > =================================================================== > --- kern/sched_4bsd.c (revision 220190) > +++ kern/sched_4bsd.c (working copy) > _at__at_ -463,6 +463,10 _at__at_ > sx_slock(&allproc_lock); > FOREACH_PROC_IN_SYSTEM(p) { > PROC_LOCK(p); > + if (p->p_state == PRS_NEW) { > + PROC_UNLOCK(p); > + continue; > + } > FOREACH_THREAD_IN_PROC(p, td) { > awake = 0; > thread_lock(td); > Index: kern/kern_resource.c > =================================================================== > --- kern/kern_resource.c (revision 220190) > +++ kern/kern_resource.c (working copy) > _at__at_ -129,7 +129,8 @@ > sx_sunlock(&proctree_lock); > LIST_FOREACH(p, &pg->pg_members, p_pglist) { > PROC_LOCK(p); > - if (p_cansee(td, p) == 0) { > + if (p->p_state == PRS_NORMAL && > + p_cansee(td, p) == 0) { > if (p->p_nice < low) > low = p->p_nice; > } > _at__at_ -215,7 +216,8 _at__at_ > sx_sunlock(&proctree_lock); > LIST_FOREACH(p, &pg->pg_members, p_pglist) { > PROC_LOCK(p); > - if (p_cansee(td, p) == 0) { > + if (p->p_state == PRS_NORMAL && > + p_cansee(td, p) == 0) { > error = donice(td, p, uap->prio); > found++; > } > _at__at_ -230,7 +232,8 _at__at_ > sx_slock(&allproc_lock); > FOREACH_PROC_IN_SYSTEM(p) { > PROC_LOCK(p); > - if (p->p_ucred->cr_uid == uap->who && > + if (p->p_state == PRS_NORMAL && > + p->p_ucred->cr_uid == uap->who && > p_cansee(td, p) == 0) { > error = donice(td, p, uap->prio); > found++; > Index: vm/vm_glue.c > =================================================================== > --- vm/vm_glue.c (revision 220190) > +++ vm/vm_glue.c (working copy) > _at__at_ -730,7 +730,8 _at__at_ > sx_slock(&allproc_lock); > FOREACH_PROC_IN_SYSTEM(p) { > PROC_LOCK(p); > - if (p->p_flag & (P_SWAPPINGOUT | P_SWAPPINGIN | P_INMEM)) { > + if (p->p_state == PRS_NEW || > + p->p_flag & (P_SWAPPINGOUT | P_SWAPPINGIN | P_INMEM)) { > PROC_UNLOCK(p); > continue; > } > > -- > John Baldwin > Thanks for larger patch. If the problem persists on another place, I send a word.Received on Fri Apr 01 2011 - 09:05:22 UTC
This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:13 UTC