Searched hist:15235 (Results 1 - 1 of 1) sorted by relevance

/freebsd-current/sys/kern/
H A Dsys_pipe.cdiff f5252370 Sun Dec 12 19:55:47 MST 1999 Tor Egge <tegge@FreeBSD.org> 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>

Completed in 141 milliseconds