SHA256
1
0
forked from pool/xen
OBS User unknown
2007-02-22 13:55:08 +00:00
committed by Git OBS Bridge
parent 44b305a3f0
commit 39a4f201bc
5 changed files with 57 additions and 5 deletions

View File

@@ -0,0 +1,34 @@
---
xen/common/domctl.c | 17 +++++++++++++----
1 file changed, 13 insertions(+), 4 deletions(-)
Index: build-32-release304-13138/xen/common/domctl.c
===================================================================
--- build-32-release304-13138.orig/xen/common/domctl.c
+++ build-32-release304-13138/xen/common/domctl.c
@@ -708,12 +708,21 @@ ret_t do_domctl(XEN_GUEST_HANDLE(xen_dom
#ifdef CONFIG_COMPAT
case XEN_DOMCTL_set_compat:
- ret = switch_compat(find_domain_by_id(op->domain));
- break;
-
case XEN_DOMCTL_set_native:
- ret = switch_native(find_domain_by_id(op->domain));
+ {
+ struct domain *d;
+
+ ret = -ESRCH;
+ d = find_domain_by_id(op->domain);
+ if (d) {
+ if (op->cmd == XEN_DOMCTL_set_compat)
+ ret = switch_compat(d);
+ else
+ ret = switch_native(d);
+ put_domain(d);
+ }
break;
+ }
#endif
default: