minix/servers
David van Moolenbroek f310aefcbd PM: resolve fork/kill race condition
When a process forks, VFS is informed on behalf of the child. This is
correct, because otherwise signals to the new child could get lost.
However, that means that the parent is not blocked from being killed
by a signal while the child is blocked on this VFS call. As a result,
by the time that the VFS reply comes in, the parent may already be
dead, and the child may thus have been assigned a new parent: INIT.

Previously, PM would blindly reply to the parent when the VFS reply
for the fork came in. Thus, it could end up sending a reply to INIT,
even though INIT did not issue the fork(2) call. This could end up
satisfying a different call from INIT (typically waitpid(2)) and then
cause an error when that other call was complete.

It would be possible to set VFS_CALL on both forking parent and child.
This patch instead adds a flag (NEW_PARENT) to note that a process's
parent has changed during a VFS call.

Change-Id: Iad930b2e441db54fe6f7d2fd011f0f6a26e2923d
2014-03-01 09:04:59 +01:00
..
devman netbsd dirent.h, import sys/sys *.h, mfs cleanup 2014-03-01 09:04:59 +01:00
ds Input infrastructure, INPUT server, PCKBD driver 2014-03-01 09:04:55 +01:00
ext2 netbsd dirent.h, import sys/sys *.h, mfs cleanup 2014-03-01 09:04:59 +01:00
hgfs Create SFFS library out of HGFS 2012-04-09 18:08:26 +02:00
inet Replacing timer_t by netbsd's timer_t 2014-03-01 09:04:54 +01:00
init init: handle getty string of "" (default) 2013-06-12 07:04:53 +00:00
input Input infrastructure, INPUT server, PCKBD driver 2014-03-01 09:04:55 +01:00
ipc moving prototypes to lib.h 2014-02-18 11:25:01 +01:00
is PM: rework signal handling 2014-03-01 09:04:59 +01:00
iso9660fs netbsd dirent.h, import sys/sys *.h, mfs cleanup 2014-03-01 09:04:59 +01:00
lwip Replacing timer_t by netbsd's timer_t 2014-03-01 09:04:54 +01:00
mfs netbsd dirent.h, import sys/sys *.h, mfs cleanup 2014-03-01 09:04:59 +01:00
pfs UDS: split off from PFS 2014-03-01 09:04:57 +01:00
pm PM: resolve fork/kill race condition 2014-03-01 09:04:59 +01:00
procfs PM: rework signal handling 2014-03-01 09:04:59 +01:00
rs VFS: further cleanup of device code 2014-03-01 09:04:58 +01:00
sched Replacing timer_t by netbsd's timer_t 2014-03-01 09:04:54 +01:00
vbfs Add VBFS: VirtualBox Shared Folder File System 2012-04-11 00:27:48 +02:00
vfs PM: remove obsolete ALARM, PAUSE, TIMES calls 2014-03-01 09:04:59 +01:00
vm Input infrastructure, INPUT server, PCKBD driver 2014-03-01 09:04:55 +01:00
Makefile Input infrastructure, INPUT server, PCKBD driver 2014-03-01 09:04:55 +01:00
Makefile.inc Removing obsolete _MINIX define 2013-02-26 09:44:20 +00:00