Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern Back out previous.
details: https://anonhg.NetBSD.org/src/rev/8b1b968bd150
branches: trunk
changeset: 336990:8b1b968bd150
user: riastradh <riastradh%NetBSD.org@localhost>
date: Sun Mar 29 15:05:34 2015 +0000
description:
Back out previous.
It appears to be causing anita install to fail. Evidently
VM_SPACE_IS_KERNEL_P(vm) is not mutually exclusive with `vm ==
curproc->p_vmspace' -- in particular, proc0's VM space is kernel.
Making this work in rump for tests will require another approach.
diffstat:
sys/kern/subr_copy.c | 16 ++++++++--------
1 files changed, 8 insertions(+), 8 deletions(-)
diffs (50 lines):
diff -r 1f4d28124c43 -r 8b1b968bd150 sys/kern/subr_copy.c
--- a/sys/kern/subr_copy.c Sun Mar 29 14:39:41 2015 +0000
+++ b/sys/kern/subr_copy.c Sun Mar 29 15:05:34 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: subr_copy.c,v 1.2 2015/03/28 16:13:38 riastradh Exp $ */
+/* $NetBSD: subr_copy.c,v 1.3 2015/03/29 15:05:34 riastradh Exp $ */
/*-
* Copyright (c) 1997, 1998, 1999, 2002, 2007, 2008 The NetBSD Foundation, Inc.
@@ -79,7 +79,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: subr_copy.c,v 1.2 2015/03/28 16:13:38 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: subr_copy.c,v 1.3 2015/03/29 15:05:34 riastradh Exp $");
#include <sys/param.h>
#include <sys/fcntl.h>
@@ -211,12 +211,12 @@
if (len == 0)
return (0);
+ if (VMSPACE_IS_KERNEL_P(vm)) {
+ return kcopy(uaddr, kaddr, len);
+ }
if (__predict_true(vm == curproc->p_vmspace)) {
return copyin(uaddr, kaddr, len);
}
- if (VMSPACE_IS_KERNEL_P(vm)) {
- return kcopy(uaddr, kaddr, len);
- }
iov.iov_base = kaddr;
iov.iov_len = len;
@@ -244,12 +244,12 @@
if (len == 0)
return (0);
+ if (VMSPACE_IS_KERNEL_P(vm)) {
+ return kcopy(kaddr, uaddr, len);
+ }
if (__predict_true(vm == curproc->p_vmspace)) {
return copyout(kaddr, uaddr, len);
}
- if (VMSPACE_IS_KERNEL_P(vm)) {
- return kcopy(kaddr, uaddr, len);
- }
iov.iov_base = __UNCONST(kaddr); /* XXXUNCONST cast away const */
iov.iov_len = len;
Home |
Main Index |
Thread Index |
Old Index