direct-io.hg
changeset 5548:d5eaab0c875d
bitkeeper revision 1.1730 (42ba7dbdkTADQfBqHaC_Ynqo3i1ZVw)
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@us.ibm.com>
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@us.ibm.com>
author | kaf24@firebug.cl.cam.ac.uk |
---|---|
date | Thu Jun 23 09:15:41 2005 +0000 (2005-06-23) |
parents | 84b9630129d7 |
children | e1627c8b4e45 |
files | tools/libxc/xc_domain.c |
line diff
1.1 --- a/tools/libxc/xc_domain.c Thu Jun 23 09:13:44 2005 +0000 1.2 +++ b/tools/libxc/xc_domain.c Thu Jun 23 09:15:41 2005 +0000 1.3 @@ -79,6 +79,8 @@ int xc_domain_getinfo(int xc_handle, 1.4 dom0_op_t op; 1.5 int rc = 0; 1.6 1.7 + memset(info, 0, max_doms*sizeof(xc_dominfo_t)); 1.8 + 1.9 for ( nr_doms = 0; nr_doms < max_doms; nr_doms++ ) 1.10 { 1.11 op.cmd = DOM0_GETDOMAININFO;