minix/servers
David van Moolenbroek b40debead8 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
2013-11-06 01:07:41 +01:00
..
devman work-3.2.1 squash commit 2013-11-05 18:25:04 +01:00
ds work-3.2.1 squash commit 2013-11-05 18:25:04 +01:00
ext2 work-3.2.1 squash commit 2013-11-05 18:25:04 +01:00
hgfs Create SFFS library out of HGFS 2012-04-09 18:08:26 +02:00
inet work-3.2.1 squash commit 2013-11-05 18:25:04 +01:00
init init: handle getty string of "" (default) 2013-06-12 07:04:53 +00:00
input work-3.2.1 squash commit 2013-11-05 18:25:04 +01:00
ipc work-3.2.1 squash commit 2013-11-05 18:25:04 +01:00
is PM: rework signal handling 2013-11-06 01:07:32 +01:00
iso9660fs work-3.2.1 squash commit 2013-11-05 18:25:04 +01:00
lwip work-3.2.1 squash commit 2013-11-05 18:25:04 +01:00
mfs work-3.2.1 squash commit 2013-11-05 18:25:04 +01:00
pfs work-3.2.1 squash commit 2013-11-05 18:25:04 +01:00
pm PM: resolve fork/kill race condition 2013-11-06 01:07:41 +01:00
procfs PM: rework signal handling 2013-11-06 01:07:32 +01:00
rs work-3.2.1 squash commit 2013-11-05 18:25:04 +01:00
sched work-3.2.1 squash commit 2013-11-05 18:25:04 +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 2013-11-05 18:26:11 +01:00
vm work-3.2.1 squash commit 2013-11-05 18:25:04 +01:00
Makefile work-3.2.1 squash commit 2013-11-05 18:25:04 +01:00
Makefile.inc Removing obsolete _MINIX define 2013-02-26 09:44:20 +00:00