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 Set b_error in vunmapbuf() if copy...



details:   https://anonhg.NetBSD.org/src/rev/0ea66f7b215b
branches:  trunk
changeset: 761906:0ea66f7b215b
user:      pooka <pooka%NetBSD.org@localhost>
date:      Thu Feb 10 13:49:10 2011 +0000

description:
Set b_error in vunmapbuf() if copyout_proc fails.
XXX: what if copyin fails in vmapbuf()?

diffstat:

 sys/rump/librump/rumpkern/vm.c |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (35 lines):

diff -r 6c3a5cb5c320 -r 0ea66f7b215b sys/rump/librump/rumpkern/vm.c
--- a/sys/rump/librump/rumpkern/vm.c    Thu Feb 10 13:40:35 2011 +0000
+++ b/sys/rump/librump/rumpkern/vm.c    Thu Feb 10 13:49:10 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: vm.c,v 1.109 2011/02/05 17:25:45 pooka Exp $   */
+/*     $NetBSD: vm.c,v 1.110 2011/02/10 13:49:10 pooka Exp $   */
 
 /*
  * Copyright (c) 2007-2010 Antti Kantee.  All Rights Reserved.
@@ -41,7 +41,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vm.c,v 1.109 2011/02/05 17:25:45 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vm.c,v 1.110 2011/02/10 13:49:10 pooka Exp $");
 
 #include <sys/param.h>
 #include <sys/atomic.h>
@@ -782,6 +782,7 @@
                bp->b_data = rump_hypermalloc(len, 0, true, "vmapbuf");
                if (BUF_ISWRITE(bp)) {
                        copyin(bp->b_saveaddr, bp->b_data, len);
+                       /* XXX: error? */
                }
        }
 }
@@ -793,7 +794,7 @@
        /* remote case */
        if (!RUMP_LOCALPROC_P(bp->b_proc)) {
                if (BUF_ISREAD(bp)) {
-                       copyout_proc(bp->b_proc,
+                       bp->b_error = copyout_proc(bp->b_proc,
                            bp->b_data, bp->b_saveaddr, len);
                }
                rump_hyperfree(bp->b_data, len);



Home | Main Index | Thread Index | Old Index