subr_uio.c (231949) | subr_uio.c (233291) |
---|---|
1/*- 2 * Copyright (c) 1982, 1986, 1991, 1993 3 * The Regents of the University of California. All rights reserved. 4 * (c) UNIX System Laboratories, Inc. 5 * All or some portions of this file are derived from material licensed 6 * to the University of California by American Telephone and Telegraph 7 * Co. or Unix System Laboratories, Inc. and are reproduced herein with 8 * the permission of UNIX System Laboratories, Inc. --- 21 unchanged lines hidden (view full) --- 30 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 31 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 32 * SUCH DAMAGE. 33 * 34 * @(#)kern_subr.c 8.3 (Berkeley) 1/21/94 35 */ 36 37#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 1982, 1986, 1991, 1993 3 * The Regents of the University of California. All rights reserved. 4 * (c) UNIX System Laboratories, Inc. 5 * All or some portions of this file are derived from material licensed 6 * to the University of California by American Telephone and Telegraph 7 * Co. or Unix System Laboratories, Inc. and are reproduced herein with 8 * the permission of UNIX System Laboratories, Inc. --- 21 unchanged lines hidden (view full) --- 30 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 31 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 32 * SUCH DAMAGE. 33 * 34 * @(#)kern_subr.c 8.3 (Berkeley) 1/21/94 35 */ 36 37#include <sys/cdefs.h> |
38__FBSDID("$FreeBSD: head/sys/kern/subr_uio.c 231949 2012-02-21 01:05:12Z kib $"); | 38__FBSDID("$FreeBSD: head/sys/kern/subr_uio.c 233291 2012-03-22 04:52:51Z alc $"); |
39 40#include "opt_zero.h" 41 42#include <sys/param.h> 43#include <sys/systm.h> 44#include <sys/kernel.h> 45#include <sys/limits.h> 46#include <sys/lock.h> --- 135 unchanged lines hidden (view full) --- 182 KASSERT(uio->uio_segflg != UIO_USERSPACE || uio->uio_td == td, 183 ("uiomove proc")); 184 if (!nofault) 185 WITNESS_WARN(WARN_GIANTOK | WARN_SLEEPOK, NULL, 186 "Calling uiomove()"); 187 188 /* XXX does it make a sense to set TDP_DEADLKTREAT for UIO_SYSSPACE ? */ 189 newflags = TDP_DEADLKTREAT; | 39 40#include "opt_zero.h" 41 42#include <sys/param.h> 43#include <sys/systm.h> 44#include <sys/kernel.h> 45#include <sys/limits.h> 46#include <sys/lock.h> --- 135 unchanged lines hidden (view full) --- 182 KASSERT(uio->uio_segflg != UIO_USERSPACE || uio->uio_td == td, 183 ("uiomove proc")); 184 if (!nofault) 185 WITNESS_WARN(WARN_GIANTOK | WARN_SLEEPOK, NULL, 186 "Calling uiomove()"); 187 188 /* XXX does it make a sense to set TDP_DEADLKTREAT for UIO_SYSSPACE ? */ 189 newflags = TDP_DEADLKTREAT; |
190 if (uio->uio_segflg == UIO_USERSPACE && nofault) 191 newflags |= TDP_NOFAULTING; | 190 if (uio->uio_segflg == UIO_USERSPACE && nofault) { 191 /* 192 * Fail if a non-spurious page fault occurs. 193 */ 194 newflags |= TDP_NOFAULTING | TDP_RESETSPUR; 195 } |
192 save = curthread_pflags_set(newflags); 193 194 while (n > 0 && uio->uio_resid) { 195 iov = uio->uio_iov; 196 cnt = iov->iov_len; 197 if (cnt == 0) { 198 uio->uio_iov++; 199 uio->uio_iovcnt--; --- 357 unchanged lines hidden --- | 196 save = curthread_pflags_set(newflags); 197 198 while (n > 0 && uio->uio_resid) { 199 iov = uio->uio_iov; 200 cnt = iov->iov_len; 201 if (cnt == 0) { 202 uio->uio_iov++; 203 uio->uio_iovcnt--; --- 357 unchanged lines hidden --- |