Go to file
Thomas Veerman ca7a466f48 TTY: don't allow multiple readers on tty minor
TTY has no way of keeping track of multiple readers for a tty minor
device. Instead, it stores a read request for the last reader only.
Consequently, the first ("overwritten") reader gets stuck on a read
request that's never going to be finished. Also, the overwriting
causes a grant mismatch in VFS when TTY returns a reply for the
second reader.

This patch is a work around for the actual problem (i.e., keeping track
of multiple readers). It checks whether there is a read operation in
progress and returns an error if it is --preventing that reader from
getting overwritten and stuck. It fixes a bug triggered by executing
'top | more' and pressing the space bar for a while (easily reproducable
in a VM, not on hardware).
2012-04-13 13:22:13 +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: add getting active threads control msg 2012-04-13 13:21:01 +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