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] The xc_domain_getinfo does not clear the info structure

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] The xc_domain_getinfo does not clear the info structure before filling
From: BitKeeper Bot <riel@xxxxxxxxxxx>
Date: Thu, 23 Jun 2005 09:15:41 +0000
Cc: james@xxxxxxxxxxxxx
Delivery-date: Thu, 23 Jun 2005 11:04:16 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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 Development List <xen-devel@xxxxxxxxxxxxxxxxxxx>
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
ChangeSet 1.1730, 2005/06/23 10:15:41+01:00, kaf24@xxxxxxxxxxxxxxxxxxxx

        The xc_domain_getinfo does not clear the info structure before filling 
        it in, and in some circumstances it doesn't completely fill in the 
        structure for each domain.  In particular, it sets the crashed flag if 
        the domain has crashed, but does not clear it if the domain has not 
        crashed, so the crashed flag may be random stack garbage from the 
        calling program.  With the attached patch (against the latest nightly), 
        xc_domain_getinfo zeroes the array of info structures before filling 
        them in.
        
        Signed-off-by: Josh Triplett <josht@xxxxxxxxxx>



 xc_domain.c |    2 ++
 1 files changed, 2 insertions(+)


diff -Nru a/tools/libxc/xc_domain.c b/tools/libxc/xc_domain.c
--- a/tools/libxc/xc_domain.c   2005-06-23 07:05:28 -04:00
+++ b/tools/libxc/xc_domain.c   2005-06-23 07:05:28 -04:00
@@ -79,6 +79,8 @@
     dom0_op_t op;
     int rc = 0; 
 
+    memset(info, 0, max_doms*sizeof(xc_dominfo_t));
+
     for ( nr_doms = 0; nr_doms < max_doms; nr_doms++ )
     {
         op.cmd = DOM0_GETDOMAININFO;

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] The xc_domain_getinfo does not clear the info structure before filling, BitKeeper Bot <=