calculation the number of bytes to copy from the first indexed page,
leading to a negative 'n' calculation in situations that could be
triggered with a ^C on programs using pipes (such as a buildworld).
This almost universally resulted in a panic.
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $DragonFly: src/sys/kern/kern_xio.c,v 1.3 2004/04/01 17:58:02 dillon Exp $
+ * $DragonFly: src/sys/kern/kern_xio.c,v 1.4 2004/04/03 08:20:10 dillon Exp $
*/
/*
* Kernel XIO interface. An initialized XIO is basically a collection of
return(EFAULT);
offset = xio->xio_offset & PAGE_MASK;
- if ((n = PAGE_SIZE - xio->xio_offset) > bytes)
+ if ((n = PAGE_SIZE - offset) > bytes)
n = bytes;
error = 0;
return(EFAULT);
offset = xio->xio_offset & PAGE_MASK;
- if ((n = PAGE_SIZE - xio->xio_offset) > bytes)
+ if ((n = PAGE_SIZE - offset) > bytes)
n = bytes;
error = 0;