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
2010-10-25 08:32:14 +00:00
2012-03-14 16:54:30 +01:00
2011-11-18 11:11:04 +01:00
2012-04-02 16:32:32 +02:00
2012-04-12 03:02:21 +02:00
2012-04-03 01:15:36 +02:00
2012-04-13 12:54:02 +00:00
2012-04-13 12:54:02 +00:00
2012-04-12 13:26:24 +02:00
2012-04-13 13:22:57 +00:00
2012-04-12 13:26:24 +02:00
2012-04-11 20:02:15 +02:00
2012-04-12 03:03:17 +02:00
2012-04-12 13:26:24 +02:00
2012-04-11 20:02:15 +02:00
2010-01-21 10:16:05 +00:00
2012-04-01 03:45:02 +02:00
Description
A fun microkernel meant to match modern usecases
GPL-3.0 148 MiB
Languages
C 78.2%
Roff 10.2%
Assembly 4.6%
Shell 3.7%
Makefile 1.6%
Other 1.2%