Go to file
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
benchmarks Fixed unixbench Run script 2010-10-25 08:32:14 +00:00
bin Import NetBSD cat(1) 2012-03-14 16:54:30 +01:00
commands Add a simple utility to send control messages 2012-04-13 12:58:41 +00:00
common VFS: enable sending control messages 2012-04-13 12:54:55 +00:00
dist/bzip2 import NetBSD bzip2 and libbz2 2011-11-18 11:11:04 +01:00
docs add UPDATING note about genassym 2012-04-02 16:32:32 +02:00
drivers TTY: don't allow multiple readers on tty minor 2012-04-13 13:22:13 +00:00
etc retire bios_wini 2012-04-12 03:02:21 +02:00
external Import NetBSD file(1) 2012-04-03 01:15:36 +02:00
include libmthread: add stack traces 2012-04-13 12:54:02 +00:00
kernel import genassym and use it for sconst.h in kernel 2012-03-31 15:29:53 +02:00
lib libmthread: add stack traces 2012-04-13 12:54:02 +00:00
libexec switch to netbsd csu 2012-04-12 13:26:24 +02:00
man Add a simple utility to send control messages 2012-04-13 12:58:41 +00:00
sbin Full switch to clang/ELF. Drop ack. Simplify. 2012-02-14 14:52:02 +01:00
servers VFS: fix filp reuse race 2012-04-13 13:22:57 +00:00
share switch to netbsd csu 2012-04-12 13:26:24 +02:00
sys Import NetBSD usr.bin/login 2012-04-11 20:02:15 +02:00
test test: convert to bsdish Makefile 2012-04-12 03:03:17 +02:00
tools switch to netbsd csu 2012-04-12 13:26:24 +02:00
usr.bin Import NetBSD usr.bin/login 2012-04-11 20:02:15 +02:00
usr.sbin user(8): remove output file from source 2012-02-14 15:49:04 +01:00
.gitignore Full switch to clang/ELF. Drop ack. Simplify. 2012-02-14 14:52:02 +01:00
LICENSE Fix parameter parsing in cut 2010-01-21 10:16:05 +00:00
Makefile clean up master Makefile a bit 2012-04-01 03:45:02 +02:00