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-08-28 01:08:13 +00:00
1999-11-21 12:38:21 +00:00
1999-11-21 12:38:21 +00:00
1999-10-29 18:09:36 +00:00
1999-08-28 01:08:13 +00:00
1999-08-28 01:08:13 +00:00
1999-08-28 01:08:13 +00:00
1999-11-21 19:03:20 +00:00
1999-10-11 15:00:09 +00:00
1999-11-21 19:03:20 +00:00
1999-10-29 18:09:36 +00:00
1999-08-19 16:06:08 +00:00
1999-08-28 01:08:13 +00:00
1999-08-28 01:08:13 +00:00
1999-11-14 13:54:44 +00:00
1999-08-28 01:08:13 +00:00
1999-10-05 21:19:41 +00:00
1999-10-29 18:09:36 +00:00
1999-12-03 09:10:04 +00:00
1999-08-28 01:08:13 +00:00
1999-11-09 21:35:10 +00:00
1999-08-28 01:08:13 +00:00
1999-10-12 02:54:23 +00:00
1999-12-13 02:55:47 +00:00
1999-11-21 19:03:20 +00:00
1999-08-28 01:08:13 +00:00
1999-08-28 01:08:13 +00:00
1999-08-28 01:08:13 +00:00
1999-10-29 18:09:36 +00:00
1999-08-28 01:08:13 +00:00
1999-08-28 01:08:13 +00:00
1999-08-28 01:08:13 +00:00
1999-08-28 01:08:13 +00:00
1999-10-29 18:09:36 +00:00