svn commit: r343724 - head/sys/kern
Konstantin Belousov
kib at FreeBSD.org
Sun Feb 3 21:31:41 UTC 2019
Author: kib
Date: Sun Feb 3 21:31:40 2019
New Revision: 343724
URL: https://svnweb.freebsd.org/changeset/base/343724
Log:
Do not call PHOLD() while owning the allproc_lock sx.
Otherwise the lock might recurse in faultin() if the process is
swapped out.
Reported by: zeising
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Modified:
head/sys/kern/kern_proc.c
Modified: head/sys/kern/kern_proc.c
==============================================================================
--- head/sys/kern/kern_proc.c Sun Feb 3 21:28:58 2019 (r343723)
+++ head/sys/kern/kern_proc.c Sun Feb 3 21:31:40 2019 (r343724)
@@ -3112,8 +3112,8 @@ allproc_loop:
PROC_UNLOCK(p);
continue;
}
- _PHOLD(p);
sx_xunlock(&allproc_lock);
+ _PHOLD(p);
r = thread_single(p, SINGLE_ALLPROC);
if (r != 0)
restart = true;
More information about the svn-src-all
mailing list