freebsd-skq/sys
David Xu 12a480fa41 When a thread is blocked in direct write state, it only sets PIPE_DIRECTW
flag but not PIPE_WANTW, but FIFO pipe code does not understand this internal
state, when a FIFO peer reader closes the pipe, it wants to notify the writer,
it checks PIPE_WANTW, if not set, it skips calling wakeup(), so blocked writer
never noticed the case, but in general, the writer should return from the
syscall with EPIPE error code and may get SIGPIPE signal. Setting the
PIPE_WANTW fixed problem, or you can turn off direct write, it should fix the
problem too. This bug is found by PR/170203.

Another bug in FIFO pipe code is when peer closes the pipe, another end which
is being blocked in select() or poll() is not notified, it missed to call
pipeselwakeup().

Third problem is found in poll regression test, the existing code can not
pass 6b,6c,6d tests, but FreeBSD-4 works. This commit does not fix the
problem, I still need to study more to find the cause.

PR: 170203
Tested by: Garrett Copper < yanegomi at gmail dot com >
2012-07-31 02:00:37 +00:00
..
amd64 Change (unused) prototype for stmxcsr() to match reality. 2012-07-30 19:26:02 +00:00
arm These files will support the whole at91sam9x5 family when done, 2012-07-30 21:30:43 +00:00
boot Pull the tier-2 card and change the sparc64 ZFS loader to no longer probe 2012-07-27 18:23:11 +00:00
bsm
cam Remove opt_enc.h from files committed with r235911. enc(4) is the 2012-07-30 03:00:58 +00:00
cddl Partial MFV (illumos-gate 13753:2aba784c276b) 2012-07-30 23:14:24 +00:00
compat Cosmetics: define FREEBSD32_MINUSER and AOUT32_MINUSER for struct 2012-07-22 13:41:45 +00:00
conf Until now KTR_ENTRIES, which defines the size of circular buffer used in 2012-07-30 22:46:42 +00:00
contrib Update to latest git version of dtc to get new dtsv2 support, 2012-07-24 16:29:33 +00:00
crypto
ddb Update the ddb and gdb backends for the new 'trace_thread' hook. 2012-04-12 21:34:58 +00:00
dev - move the inclusion of netmap headers to the common part of the code; 2012-07-30 18:21:48 +00:00
fs When a thread is blocked in direct write state, it only sets PIPE_DIRECTW 2012-07-31 02:00:37 +00:00
gdb Update the ddb and gdb backends for the new 'trace_thread' hook. 2012-04-12 21:34:58 +00:00
geom Partially revert r238886 in part of GEOM_VFS spoiling. 2012-07-29 20:04:09 +00:00
gnu/fs Fix build: 2012-05-23 06:49:50 +00:00
i386 Regen. 2012-07-30 20:45:17 +00:00
ia64 Move PCPU initialization to a new function called cpu_pcpu_setup(). 2012-07-08 18:00:22 +00:00
isa
kern When a thread is blocked in direct write state, it only sets PIPE_DIRECTW 2012-07-31 02:00:37 +00:00
kgssapi
libkern Fix unloading of libiconv module. 2012-06-11 17:42:39 +00:00
mips Merge FreeBSD/beri Perforce change @211945 to head: 2012-07-28 11:09:03 +00:00
modules Remove opt_enc.h from files committed with r235911. enc(4) is the 2012-07-30 03:00:58 +00:00
net Hardcode the loopback rx/tx checkum options for IPv6 to on without 2012-07-28 20:31:39 +00:00
net80211 Add a check for dynamic OFDM/CCK channel types. 2012-07-01 04:25:49 +00:00
netatalk Fix typos 2012-02-28 15:07:05 +00:00
netgraph Add version so others can depend on this module 2012-07-27 13:57:28 +00:00
netinet Fix the sctp_sockstore union such that userland programs don't depend 2012-07-26 08:10:29 +00:00
netinet6 For consistency put the IPsec comment iside the #fidef section. 2012-07-29 00:45:24 +00:00
netipsec Fix a bug introduced in r221129 that leads to a panic wen using bundled 2012-07-22 17:46:05 +00:00
netipx
netnatm
netncp Add characters mapping for codepages used in Germany. 2012-06-01 03:59:08 +00:00
netsmb Change a duplicated check to clarify that we really want to set a 2012-07-10 21:02:59 +00:00
nfs
nfsclient PR# 165923 reported intermittent write failures for dirty 2012-05-12 12:02:51 +00:00
nfsserver
nlm
ofed Fix clang warning when compiling iw_cxgb. 2012-06-25 16:52:27 +00:00
opencrypto
pc98 Partially revert r217515 so that the mem_range_softc variable is always 2012-07-09 20:42:08 +00:00
pci intpm: add ATI IXP400 pci id 2012-04-16 10:33:46 +00:00
powerpc Avoid recursion on the pvh global lock in the aim oea pmap. 2012-07-10 22:10:21 +00:00
rpc
security Check vplabel for NULL before dereferencing it. Fixes a panic 2012-05-03 15:51:34 +00:00
sparc64 Switch back to the 4BSD scheduler for now. There is some more or less 2012-06-30 14:55:36 +00:00
sys When a thread is blocked in direct write state, it only sets PIPE_DIRECTW 2012-07-31 02:00:37 +00:00
teken
tools
ufs Use NULL instead of 0 for pointers 2012-07-22 15:40:31 +00:00
vm Eliminate an unneeded declaration. (I should have removed this as part 2012-07-30 20:38:37 +00:00
x86 Add rmb() to tsc_read_##x to enforce serialization of rdtsc captures. 2012-07-24 22:10:11 +00:00
xdr
xen blkif interface comment cleanups. No functional changes 2012-02-29 17:47:01 +00:00
Makefile Add sys/ofed to the 'make cscope' target. 2012-03-20 18:05:15 +00:00