freebsd-dev/sys
Ed Schouten c0086bf202 Serialize write() calls on TTYs.
Just like the old TTY layer, the current MPSAFE TTY layer does not make
any attempt to serialize calls of write(). Data is copied into the
kernel in 256 (TTY_STACKBUF) byte chunks. If a write() call occurs at
the same time, the data may interleave. This is especially likely when
the TTY starts blocking, because the output queue reaches the high
watermark.

I've implemented this by adding a new flag, TTY_BUSY_OUT, which is used
to mark a TTY as having a thread stuck in write(). Because I don't want
non-blocking processes to be possibly blocked by a sleeping thread, I'm
still allowing it to bypass the protection. According to this message,
the Linux kernel returns EAGAIN in such cases, but I think that's a
little too restrictive:

	http://kerneltrap.org/index.php?q=mailarchive/linux-kernel/2007/5/2/85418/thread

PR:		kern/118287
2009-02-11 16:28:49 +00:00
..
amd64 Add option GEOM_PART_EBR by default on amd64 and i386. 2009-02-10 00:08:39 +00:00
arm The bounce zone sees its page number increased if multiple dma maps use it in 2009-02-09 18:03:31 +00:00
boot - Use the generally more appropriate PROM base rather than the 2009-02-10 21:48:42 +00:00
bsm
cam Adding dynamic sysctls no longer requires Giant. 2009-02-10 22:39:44 +00:00
cddl Last step of splitting up minor and unit numbers: remove minor(). 2009-01-28 17:57:16 +00:00
compat Change some movl's to mov's. Newer GAS no longer accept 'movl' instructions 2009-01-31 11:37:21 +00:00
conf Add option GEOM_PART_EBR by default on amd64 and i386. 2009-02-10 00:08:39 +00:00
contrib Revert my previous two changes. 2009-01-25 16:52:41 +00:00
crypto identify routine takes driver_t *, not device_t *. 2009-02-05 19:30:28 +00:00
ddb
dev Fix lptopen() and lptclose() to not trash the state of the HAVEBUS flag 2009-02-11 14:25:09 +00:00
fs Mark udf(4) MPSAFE and add support for shared vnode locks during pathname 2009-02-09 20:50:23 +00:00
gdb
geom Fix g_part_dumpconf and g_part_name prototpyes. 2009-02-10 02:43:07 +00:00
gnu - Eliminate warnings in debug print macros by explicitly converting all 2009-01-18 15:10:46 +00:00
i386 Add option GEOM_PART_EBR by default on amd64 and i386. 2009-02-10 00:08:39 +00:00
ia64 Mark the BSP as being awake. This supresses the message 2009-02-10 20:29:57 +00:00
isa
kern Serialize write() calls on TTYs. 2009-02-11 16:28:49 +00:00
kgssapi
libkern
mips Eliminate an unused definition. 2009-02-10 06:08:28 +00:00
modules Hook uslcom2 up to the build. 2009-02-09 22:38:55 +00:00
net Call prison_if from rtm_get_jailed, instead of splitting it out into 2009-02-05 14:58:16 +00:00
net80211 when operating as a slave, clear neighbor entries and the peer bss node 2009-02-10 23:52:28 +00:00
netatalk Remove local variable 'ddp' from DDP's attach and detach routines; they 2009-02-04 20:04:32 +00:00
netgraph Update comment. soalloc() is no longer performing M_WAITOK memory allocations. 2009-02-10 20:27:05 +00:00
netinet Add padding to then end of the xsctp_xxx structures to 2009-02-09 17:37:17 +00:00
netinet6 Try to remove/assimilate as much of formerly IPv4/6 specific 2009-02-08 09:27:07 +00:00
netipsec Try to remove/assimilate as much of formerly IPv4/6 specific 2009-02-08 09:27:07 +00:00
netipx
netnatm
netncp
netsmb
nfs
nfs4client Last step of splitting up minor and unit numbers: remove minor(). 2009-01-28 17:57:16 +00:00
nfsclient Last step of splitting up minor and unit numbers: remove minor(). 2009-01-28 17:57:16 +00:00
nfsserver Audit the flag argument to the nfssvc(2) system call. 2009-02-08 14:04:08 +00:00
nlm
opencrypto Fix return type for detach routine (should be int) 2009-02-05 17:43:12 +00:00
pc98 Bring missing comments on EPSON_BOUNCEDMA and EPSON_MEMWIN flags. 2009-02-08 10:21:25 +00:00
pccard
pci Allocating 2 MSI messages do not seem to work on certain controllers 2009-02-11 00:23:56 +00:00
powerpc Add support for the I2S and davbus audio controllers found in Apple PowerPC 2009-01-25 18:20:15 +00:00
rpc Use the correct creds when reconnecting so that we have enough privilege to 2009-02-05 11:48:10 +00:00
security Set the lower bound on queue size for an audit pipe to 1 instead of 0, 2009-02-08 15:38:31 +00:00
sparc64 Improve r185008 so the streaming cache is only flushed when 2009-02-10 21:51:33 +00:00
sun4v - Use the generally more appropriate PROM base rather than the 2009-02-11 07:50:07 +00:00
sys Serialize write() calls on TTYs. 2009-02-11 16:28:49 +00:00
tools
ufs When a device containing mounted UFS filesystem disappears, the type 2009-02-06 17:14:07 +00:00
vm Comment out the assertion from r188321. It is not valid for nfs. 2009-02-09 11:32:23 +00:00
xdr
xen
Makefile