xen/xenpaging.tools_xenpaging_cleanup.patch
Charles Arnold 0c76f22ef1 - Update to Xen 4.0.2 rc2-pre, changeset 21443
- bnc#633573 - System fail to boot after running several warm
  reboot tests
  22749-vtd-workarounds.patch
- Upstream patches from Jan
  22744-ept-pod-locking.patch
  22777-vtd-ats-fixes.patch
  22781-pod-hap-logdirty.patch
  22782-x86-emul-smsw.patch
  22789-i386-no-x2apic.patch
  22790-svm-resume-migrate-pirqs.patch
  22816-x86-pirq-drop-priv-check.patch

OBS-URL: https://build.opensuse.org/package/show/Virtualization/xen?expand=0&rev=94
2011-02-04 21:19:54 +00:00

59 lines
1.6 KiB
Diff

Subject: xenpaging: Fix-up xenpaging tool code.
This isn't directly related to EPT checking, but does some general fix-ups
to the xenpaging code (adds some extra frees, etc.)
(xen-unstable changeset: 21890:3263d0ff9476)
Already-Signed-off-by: Patrick Colp <pjcolp@cs.ubc.ca>
Signed-off-by: Olaf Hering <olaf@aepfle.de>
---
tools/xenpaging/xenpaging.c | 22 ++++++++++++++++++----
1 file changed, 18 insertions(+), 4 deletions(-)
Index: xen-4.0.2-testing/tools/xenpaging/xenpaging.c
===================================================================
--- xen-4.0.2-testing.orig/tools/xenpaging/xenpaging.c
+++ xen-4.0.2-testing/tools/xenpaging/xenpaging.c
@@ -101,7 +101,7 @@ xenpaging_t *xenpaging_init(domid_t doma
paging->mem_event.ring_page = init_page();
if ( paging->mem_event.ring_page == NULL )
{
- ERROR("Error initialising shared page");
+ ERROR("Error initialising ring page");
goto err;
}
@@ -199,13 +199,27 @@ xenpaging_t *xenpaging_init(domid_t doma
return paging;
err:
- if ( paging->bitmap )
+ if ( paging )
+ {
+ if ( paging->mem_event.shared_page )
+ {
+ munlock(paging->mem_event.shared_page, PAGE_SIZE);
+ free(paging->mem_event.shared_page);
+ }
+
+ if ( paging->mem_event.ring_page )
+ {
+ munlock(paging->mem_event.ring_page, PAGE_SIZE);
+ free(paging->mem_event.ring_page);
+ }
+
free(paging->bitmap);
- if ( paging->platform_info )
free(paging->platform_info);
- if ( paging )
+ free(paging->domain_info);
free(paging);
+ }
+ err_iface:
return NULL;
}