minix/servers/vfs
Thomas Veerman 26ec619a30 VFS: fix filp reuse race
Pipes consist of two filps (read filp and write filp) and a shared
vnode. When the writer leaves the filp reference count drops to
zero and subsequent find_filp()s should not find the filp when a
reader looks for it and the reader gets EOF. However, the pipe()
system call tries to find two filps, marks them in use, and only
after a successful node creation on PFS, overwrites the shared
vnode with the new vnode. Consequently, this leaves a small window
where a just closed 'pipe write filp' gets reused and marked as
present, before becoming the actual new 'pipe write filp' for a new
pipe. A reader for the old pipe will think a writer is present and
wait for that writer to write something or to leave; both actions
should revive the suspended reader. This will never happen and the
reader will be stuck forever.
2012-04-13 13:22:57 +00:00
..
comm.c VFS: make m_in job local 2012-04-13 12:50:38 +00:00
comm.h VFS: replace VFS with AVFS 2012-02-13 16:53:21 +00:00
const.h VFS: replace VFS with AVFS 2012-02-13 16:53:21 +00:00
coredump.c VFS: fix new signed/unsigned comparisons 2012-04-13 13:00:11 +00:00
device.c VFS: make m_in job local 2012-04-13 12:50:38 +00:00
dmap.c VFS: fix dead lock 2012-04-13 13:19:10 +00:00
dmap.h retire _PROTOTYPE 2012-03-25 16:17:10 +02:00
exec.c VFS: fix new signed/unsigned comparisons 2012-04-13 13:00:11 +00:00
exec.h Implement issetugid syscall 2011-11-28 10:03:43 +00:00
file.h VFS: replace VFS with AVFS 2012-02-13 16:53:21 +00:00
filedes.c VFS: fix filp reuse race 2012-04-13 13:22:57 +00:00
fproc.h VFS: replace VFS with AVFS 2012-02-13 16:53:21 +00:00
fs.h VFS: make m_in job local 2012-04-13 12:50:38 +00:00
fscall.c VFS: make m_in job local 2012-04-13 12:50:38 +00:00
gcov.c VFS: make m_in job local 2012-04-13 12:50:38 +00:00
glo.h VFS: enable sending control messages 2012-04-13 12:54:55 +00:00
job.h VFS: replace VFS with AVFS 2012-02-13 16:53:21 +00:00
link.c VFS: make m_in job local 2012-04-13 12:50:38 +00:00
lock.c retire PUBLIC, PRIVATE and FORWARD 2012-03-25 21:58:14 +02:00
lock.h VFS: replace VFS with AVFS 2012-02-13 16:53:21 +00:00
main.c VFS: remove debug print 2012-04-13 13:20:28 +00:00
Makefile VFS: warnings are errors 2012-04-13 12:59:32 +00:00
misc.c VFS: add getting active threads control msg 2012-04-13 13:21:01 +00:00
mount.c VFS: make m_in job local 2012-04-13 12:50:38 +00:00
open.c VFS: make m_in job local 2012-04-13 12:50:38 +00:00
param.h VFS: replace VFS with AVFS 2012-02-13 16:53:21 +00:00
path.c VFS: make m_in job local 2012-04-13 12:50:38 +00:00
path.h VFS: replace VFS with AVFS 2012-02-13 16:53:21 +00:00
pipe.c VFS: make m_in job local 2012-04-13 12:50:38 +00:00
protect.c VFS: make m_in job local 2012-04-13 12:50:38 +00:00
proto.h VFS: fix dead lock 2012-04-13 13:19:10 +00:00
read.c VFS: make m_in job local 2012-04-13 12:50:38 +00:00
request.c VFS: make m_in job local 2012-04-13 12:50:38 +00:00
request.h VFS: replace VFS with AVFS 2012-02-13 16:53:21 +00:00
scratchpad.h VFS: replace VFS with AVFS 2012-02-13 16:53:21 +00:00
select.c VFS: fix new signed/unsigned comparisons 2012-04-13 13:00:11 +00:00
stadir.c VFS: make m_in job local 2012-04-13 12:50:38 +00:00
table.c retire PUBLIC, PRIVATE and FORWARD 2012-03-25 21:58:14 +02:00
threads.h VFS: replace VFS with AVFS 2012-02-13 16:53:21 +00:00
time.c VFS: make m_in job local 2012-04-13 12:50:38 +00:00
tll.c VFS: more three-level-lock sanity checking 2012-04-13 13:22:42 +00:00
tll.h VFS: replace VFS with AVFS 2012-02-13 16:53:21 +00:00
utility.c VFS: fix new signed/unsigned comparisons 2012-04-13 13:00:11 +00:00
vmnt.c VFS: make m_in job local 2012-04-13 12:50:38 +00:00
vmnt.h VFS: replace VFS with AVFS 2012-02-13 16:53:21 +00:00
vnode.c VFS: fix new signed/unsigned comparisons 2012-04-13 13:00:11 +00:00
vnode.h VFS: replace VFS with AVFS 2012-02-13 16:53:21 +00:00
worker.c VFS: make m_in job local 2012-04-13 12:50:38 +00:00
write.c retire PUBLIC, PRIVATE and FORWARD 2012-03-25 21:58:14 +02:00