Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/rump/librump/rumpkern Shortcircuit remote 0-len copyin/o...
details: https://anonhg.NetBSD.org/src/rev/5eced77850b2
branches: trunk
changeset: 760618:5eced77850b2
user: pooka <pooka%NetBSD.org@localhost>
date: Sun Jan 09 14:12:37 2011 +0000
description:
Shortcircuit remote 0-len copyin/out already in the kernel.
diffstat:
sys/rump/librump/rumpkern/rumpcopy.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diffs (36 lines):
diff -r 670fea919175 -r 5eced77850b2 sys/rump/librump/rumpkern/rumpcopy.c
--- a/sys/rump/librump/rumpkern/rumpcopy.c Sun Jan 09 14:10:03 2011 +0000
+++ b/sys/rump/librump/rumpkern/rumpcopy.c Sun Jan 09 14:12:37 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rumpcopy.c,v 1.14 2011/01/09 13:49:57 pooka Exp $ */
+/* $NetBSD: rumpcopy.c,v 1.15 2011/01/09 14:12:37 pooka Exp $ */
/*
* Copyright (c) 2009 Antti Kantee. All Rights Reserved.
@@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rumpcopy.c,v 1.14 2011/01/09 13:49:57 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rumpcopy.c,v 1.15 2011/01/09 14:12:37 pooka Exp $");
#include <sys/param.h>
#include <sys/lwp.h>
@@ -48,7 +48,7 @@
if (curproc->p_vmspace == vmspace_kernel()) {
memcpy(kaddr, uaddr, len);
- } else {
+ } else if (len) {
error = rumpuser_sp_copyin(curproc->p_vmspace->vm_map.pmap,
uaddr, kaddr, len);
}
@@ -67,7 +67,7 @@
if (curproc->p_vmspace == vmspace_kernel()) {
memcpy(uaddr, kaddr, len);
- } else {
+ } else if (len) {
error = rumpuser_sp_copyout(curproc->p_vmspace->vm_map.pmap,
kaddr, uaddr, len);
}
Home |
Main Index |
Thread Index |
Old Index