svn commit: r245104 - head/sys/kern
Konstantin Belousov
kib at FreeBSD.org
Sun Jan 6 15:10:11 UTC 2013
Author: kib
Date: Sun Jan 6 15:10:10 2013
New Revision: 245104
URL: http://svnweb.freebsd.org/changeset/base/245104
Log:
Protect the p->p_pgrp dereference with the process lock.
MFC after: 3 days
Modified:
head/sys/kern/kern_exit.c
Modified: head/sys/kern/kern_exit.c
==============================================================================
--- head/sys/kern/kern_exit.c Sun Jan 6 15:07:19 2013 (r245103)
+++ head/sys/kern/kern_exit.c Sun Jan 6 15:10:10 2013 (r245104)
@@ -1074,7 +1074,9 @@ kern_wait6(struct thread *td, idtype_t i
q = td->td_proc;
if ((pid_t)id == WAIT_MYPGRP && (idtype == P_PID || idtype == P_PGID)) {
+ PROC_LOCK(q);
id = (id_t)q->p_pgid;
+ PROC_UNLOCK(q);
idtype = P_PGID;
}
More information about the svn-src-all
mailing list