]> Zhao Yanbai Git Server - minix.git/commit
VFS: fix error behavior for partial pipe writes 97/2997/1
authorDavid van Moolenbroek <david@minix3.org>
Fri, 5 Jun 2015 18:28:20 +0000 (18:28 +0000)
committerDavid van Moolenbroek <david@minix3.org>
Fri, 5 Jun 2015 18:40:57 +0000 (18:40 +0000)
commit179bddcf5d405fd9e76b2f859b8ae1914df4a989
tree925bb9db70fa4037ff58f74376f9e93b9ec25eb1
parentd9494baa34075b158415cc42d68bd0927d8124c1
VFS: fix error behavior for partial pipe writes

This patch fixes two related issues:

- If a large (>PIPE_BUF) pipe write is processed partially, only to be
  followed by a write error condition, then the process is left in an
  incorrect state, possibly causing VFS to crash on a subsequent call.

- If such a partially processed large pipe write ends up resulting in
  an EPIPE error, no corresponding SIGPIPE signal is generated.

The corrected behavior is tested in test68.

Change-Id: I5540e61ab6bcc60a31201485eda04bc49ece2ca8
minix/servers/vfs/fproc.h
minix/servers/vfs/main.c
minix/servers/vfs/read.c
minix/tests/test68.c