Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/xen/xen correct error paths; still need to verify t...
details: https://anonhg.NetBSD.org/src/rev/be2e5eeacfef
branches: trunk
changeset: 332684:be2e5eeacfef
user: christos <christos%NetBSD.org@localhost>
date: Fri Oct 03 20:56:24 2014 +0000
description:
correct error paths; still need to verify that the "didn't give us back..."
case is correct.
diffstat:
sys/arch/xen/xen/privcmd.c | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diffs (34 lines):
diff -r 86c9e4d1267b -r be2e5eeacfef sys/arch/xen/xen/privcmd.c
--- a/sys/arch/xen/xen/privcmd.c Fri Oct 03 20:30:06 2014 +0000
+++ b/sys/arch/xen/xen/privcmd.c Fri Oct 03 20:56:24 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: privcmd.c,v 1.47 2014/09/21 16:56:44 christos Exp $ */
+/* $NetBSD: privcmd.c,v 1.48 2014/10/03 20:56:24 christos Exp $ */
/*-
* Copyright (c) 2004 Christian Limpach.
@@ -27,7 +27,7 @@
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: privcmd.c,v 1.47 2014/09/21 16:56:44 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: privcmd.c,v 1.48 2014/10/03 20:56:24 christos Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -576,12 +576,13 @@
if (error) {
if (obj)
obj->uobj.pgops->pgo_detach(&obj->uobj);
- kmem_free(maddr, sizeof(paddr_t) * npages);
- kmem_free(obj, sizeof(*obj));
return error;
}
if (newstart != start) {
printf("uvm_map didn't give us back our vm space\n");
+ uvm_unmap1(map, newstart, newstart + size, 0);
+ if (obj)
+ obj->uobj.pgops->pgo_detach(&obj->uobj);
return EINVAL;
}
return 0;
Home |
Main Index |
Thread Index |
Old Index