WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] [IA64] Clean up NVRAM failure case

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [IA64] Clean up NVRAM failure case
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 11 Sep 2007 15:30:21 -0700
Delivery-date: Tue, 11 Sep 2007 15:31:56 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Alex Williamson <alex.williamson@xxxxxx>
# Date 1187989754 21600
# Node ID 6644d848626685f01d6832837fdb4ab2e06fffde
# Parent  0cc2e0a1b2fcf0f46a23f51e691650893ae5aee9
[IA64] Clean up NVRAM failure case

copy_from_GFW_to_nvram() in libxc forgot munmap() if NVRAM data
invalid.  Also it forgot free() and close() too.

Signed-off-by: Masaki Kanno <kanno.masaki@xxxxxxxxxxxxxx>
---
 tools/libxc/ia64/xc_ia64_hvm_build.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletion(-)

diff -r 0cc2e0a1b2fc -r 6644d8486266 tools/libxc/ia64/xc_ia64_hvm_build.c
--- a/tools/libxc/ia64/xc_ia64_hvm_build.c      Fri Aug 24 15:06:49 2007 -0600
+++ b/tools/libxc/ia64/xc_ia64_hvm_build.c      Fri Aug 24 15:09:14 2007 -0600
@@ -684,7 +684,12 @@ copy_from_GFW_to_nvram(int xc_handle, ui
 
     /* Check is NVRAM data vaild */
     if ( !is_valid_address(tmp_ptr) )
-        return -1;
+    {
+        free(pfn_list);
+        munmap(tmp_ptr, PAGE_SIZE);
+        close(nvram_fd);
+        return -1;
+    }
 
     addr_from_GFW_4k_align = ((struct nvram_save_addr *)tmp_ptr)->addr;
     munmap(tmp_ptr, PAGE_SIZE);

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] [IA64] Clean up NVRAM failure case, Xen patchbot-unstable <=