freebsd-skq/sys
Konstantin Belousov 8638fe7bea Thread waiting for the vfork(2)-ed child to exec or exit, must allow
for the suspension.

Currently, the loop performs uninterruptible cv_wait(9) call, which
prevents suspension until child allows further execution of parent.
If child is stopped, suspension or single-threading is delayed
indefinitely.

Create a helper thread_suspend_check_needed() to identify the need for
a call to thread_suspend_check().  It is required since call to the
thread_suspend_check() cannot be safely done while owning the child
(p2) process lock.  Only when suspension is needed, drop p2 lock and
call thread_suspend_check().  Perform wait for cv with timeout, in
case suspend is requested after wait started; I do not see a better
way to interrupt the wait.

Reported and tested by:	pho
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2014-12-08 16:18:05 +00:00
..
amd64 This configuration file removes several debugging options, including 2014-12-02 19:55:43 +00:00
arm Fix buffer overflow in Marvell PCI/PCIe driver 2014-12-07 21:02:45 +00:00
boot Define the ffs() function in the USB bootloader's global and 2014-12-05 12:04:47 +00:00
bsm
cam Count consecutive read requests as blocking in CTL for files and ZVOLs. 2014-12-06 20:39:25 +00:00
cddl MFV r275540: 2014-12-08 06:04:42 +00:00
compat The process spin lock currently has the following distinct uses: 2014-11-26 14:10:00 +00:00
conf Ignore more warnings with external gcc 2014-11-29 14:30:39 +00:00
contrib Correctly define constants. 2014-11-28 04:07:06 +00:00
crypto Fix gcc build: preserve const qualifier when casting input values. 2014-11-11 13:37:28 +00:00
ddb ddb: ANSI-fy function declarations. 2014-10-12 18:01:52 +00:00
dev Add more U3G USB IDs. 2014-12-08 10:49:23 +00:00
fs The process spin lock currently has the following distinct uses: 2014-11-26 14:10:00 +00:00
gdb Add support for gdb's memory searching capabilities to our in-kernel gdb 2014-09-05 16:40:47 +00:00
geom Avoid unneeded malloc/memcpy/free if there is no metadata on disk. 2014-12-05 10:23:18 +00:00
gnu reiserfs: Use signed i_nlink 2014-09-25 19:10:32 +00:00
i386 This configuration file removes several debugging options, including 2014-12-02 19:55:43 +00:00
isa
kern Thread waiting for the vfork(2)-ed child to exec or exit, must allow 2014-12-08 16:18:05 +00:00
kgssapi Avoid dynamic syscall overhead for statically compiled modules. 2014-10-26 19:42:44 +00:00
libkern Use the unified syntax in a few more assembly files 2014-12-05 19:08:36 +00:00
mips Switch is an 8316, so make the comments say that. 2014-12-03 23:37:23 +00:00
modules remove opensolaris cyclic code, replace with high-precision callouts 2014-12-07 11:21:41 +00:00
net Remove unneded check. No need to do m_pullup to the size that we prepended. 2014-12-02 05:41:03 +00:00
net80211 Fix multiple incorrect SYSCTL arguments in the kernel: 2014-10-21 07:31:21 +00:00
netgraph In preparation of merging projects/sendfile, transform bare access to 2014-11-12 09:57:15 +00:00
netinet Include the received chunk padding when reporting an unknown chunk. 2014-12-06 22:57:19 +00:00
netinet6 Add refcounting to IPv6 DAD objects and simplify the DAD code to fix a 2014-12-08 04:44:40 +00:00
netipsec key_getspacq() returns holding the spacq_lock. Unlock it in all cases. 2014-12-07 06:47:00 +00:00
netnatm
netpfil pf(4) needs to have a correct checksum during its processing. 2014-11-19 13:31:08 +00:00
netsmb
nfs Avoid dynamic syscall overhead for statically compiled modules. 2014-10-26 19:42:44 +00:00
nfsclient Follow up to r225617. In order to maximize the re-usability of kernel code 2014-10-16 18:04:43 +00:00
nfsserver Change NFS readdir() to only ignore cookies preceding the given offset for 2014-07-01 20:00:35 +00:00
nlm Avoid dynamic syscall overhead for statically compiled modules. 2014-10-26 19:42:44 +00:00
ofed Use CURVNET macros inside inet_get_local_port_range() function. 2014-12-08 07:25:59 +00:00
opencrypto Fix build for kernels without COMPAT_FREEBSD32. 2014-09-22 17:32:27 +00:00
pc98 This configuration file removes several debugging options, including 2014-12-02 19:55:43 +00:00
powerpc This configuration file removes several debugging options, including 2014-12-02 19:55:43 +00:00
rpc In preparation of merging projects/sendfile, transform bare access to 2014-11-12 09:57:15 +00:00
security Replace dev_clone with cdevpriv(9) KPI in audit_pipe code. 2014-08-20 16:04:30 +00:00
sparc64 This configuration file removes several debugging options, including 2014-12-02 19:55:43 +00:00
sys Thread waiting for the vfork(2)-ed child to exec or exit, must allow 2014-12-08 16:18:05 +00:00
teken
tools Allow the make_dtb script to work outside of a "make buildkernel" context 2014-08-30 22:39:15 +00:00
ufs Merge from projects/sendfile: 2014-11-23 12:01:52 +00:00
vm Always ignore the deprecated MAP_RENAME and MAP_NORESERVE flags to mmap(). 2014-12-05 15:24:42 +00:00
x86 Improve support for XSAVE with debuggers. 2014-11-21 20:53:17 +00:00
xdr
xen opt_global.h is included automatically in the build. No need to 2014-11-18 17:06:56 +00:00
Makefile Remove "pci" from CSCOPEDIRS. 2014-09-23 06:32:19 +00:00