Re-acquire the PROC_SLOCK before calling calcru(), and release it after,

since calcru() expects it to be locked.

Reviewed by:	attilio
This commit is contained in:
cognet 2007-06-11 21:05:41 +00:00
parent 00f8f869d5
commit 72a3e057dd

View File

@ -2615,7 +2615,9 @@ ttyinfo(struct tty *tp)
PROC_SUNLOCK(pick);
PROC_LOCK(pick);
PGRP_UNLOCK(tp->t_pgrp);
PROC_SLOCK(pick);
calcru(pick, &utime, &stime);
PROC_SUNLOCK(pick);
pid = pick->p_pid;
bcopy(pick->p_comm, comm, sizeof(comm));
PROC_UNLOCK(pick);