sys_pipe.c (13ccadd4b00cd6944ff3e60bee50aa629a769016) sys_pipe.c (4cc712004cbc472b5ff93761b1ecbb724b6f44a1)
1/*
2 * Copyright (c) 1996 John S. Dyson
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 476 unchanged lines hidden (view full) ---

485
486 endaddr = round_page((vm_offset_t)uio->uio_iov->iov_base + size);
487 for(i = 0, addr = trunc_page((vm_offset_t)uio->uio_iov->iov_base);
488 addr < endaddr;
489 addr += PAGE_SIZE, i+=1) {
490
491 vm_page_t m;
492
1/*
2 * Copyright (c) 1996 John S. Dyson
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 476 unchanged lines hidden (view full) ---

485
486 endaddr = round_page((vm_offset_t)uio->uio_iov->iov_base + size);
487 for(i = 0, addr = trunc_page((vm_offset_t)uio->uio_iov->iov_base);
488 addr < endaddr;
489 addr += PAGE_SIZE, i+=1) {
490
491 vm_page_t m;
492
493 vm_fault_quick( (caddr_t) addr, VM_PROT_READ);
494 paddr = pmap_kextract(addr);
495 if (!paddr) {
493 if (vm_fault_quick((caddr_t)addr, VM_PROT_READ) < 0 ||
494 (paddr = pmap_kextract(addr)) == 0) {
496 int j;
497 for(j=0;j<i;j++)
498 vm_page_unwire(wpipe->pipe_map.ms[j], 1);
499 return EFAULT;
500 }
501
502 m = PHYS_TO_VM_PAGE(paddr);
503 vm_page_wire(m);

--- 602 unchanged lines hidden ---
495 int j;
496 for(j=0;j<i;j++)
497 vm_page_unwire(wpipe->pipe_map.ms[j], 1);
498 return EFAULT;
499 }
500
501 m = PHYS_TO_VM_PAGE(paddr);
502 vm_page_wire(m);

--- 602 unchanged lines hidden ---