Tor Egge f52523701c Fix two problems with pipe_write():
1. Data written beyond end of pipe buffer, causing kernel memory corruption.

    - Check that space is still valid after obtaining the pipe lock.

    - Defer the calculation of transfer size until the pipe
      lock has been obtained.

    - Update the pipe buffer pointers while holding the pipe lock.

 2. Writes of size <= PIPE_BUF not always atomic.

    - Allow an internal write to span two contiguous segments,
      so writes of size <= PIPE_BUF can be kept atomic
      when wrapping around from the end to the start of the
      pipe buffer.

PR:		15235
Reviewed by:	Matt Dillon <dillon@FreeBSD.org>
1999-12-13 02:55:47 +00:00
..
1999-12-12 21:36:19 +00:00
1999-12-12 21:36:19 +00:00
1999-11-02 22:40:15 +00:00
1999-12-12 21:10:53 +00:00
1999-12-13 02:55:47 +00:00
1999-08-28 01:08:13 +00:00
1999-12-12 21:10:53 +00:00
1999-12-10 14:03:47 +00:00
1999-08-28 01:08:13 +00:00
1999-08-27 23:45:13 +00:00
1999-12-11 16:13:02 +00:00
1999-11-14 13:54:44 +00:00