提交 7e6a06ae 编写于 作者: J Jim Meyering

fix numa-related (and kernel-dependent) test failures

This change is required on some kernels due to the way a change in
the kernel's CONFIG_NR_CPUS propagates through the numa library.
* src/qemu_conf.c (qemudCapsInitNUMA): Pass numa_all_cpus_ptr->size/8
as the buffer-length-in-bytes in the call to numa_node_to_cpus, since
that's what is required on second and subseqent calls.
* src/uml_conf.c (umlCapsInitNUMA): Likewise.
上级 0e459cbd
Wed Dec 17 08:02:01 +0100 2008 Jim Meyering <meyering@redhat.com>
fix numa-related (and kernel-dependent) test failures
This change is required on some kernels due to the way a change in
the kernel's CONFIG_NR_CPUS propagates through the numa library.
* src/qemu_conf.c (qemudCapsInitNUMA): Pass numa_all_cpus_ptr->size/8
as the buffer-length-in-bytes in the call to numa_node_to_cpus, since
that's what is required on second and subseqent calls.
* src/uml_conf.c (umlCapsInitNUMA): Likewise.
Tue Dec 16 17:26:49 EST 2008 Cole Robinson <crobinso@redhat.com>
* src/qemu_driver.c: Sanitize qemu monitor reads.
......
......@@ -323,8 +323,8 @@ qemudCapsInitNUMA(virCapsPtr caps)
goto cleanup;
for (n = 0 ; n <= numa_max_node() ; n++) {
if (numa_node_to_cpus(n, mask, MAX_CPUS_MASK_LEN / 8) < 0)
int mask_n_bytes = numa_all_cpus_ptr->size / 8;
if (numa_node_to_cpus(n, mask, mask_n_bytes) < 0)
goto cleanup;
for (ncpus = 0, i = 0 ; i < MAX_CPUS ; i++)
......
......@@ -79,8 +79,8 @@ umlCapsInitNUMA(virCapsPtr caps)
goto cleanup;
for (n = 0 ; n <= numa_max_node() ; n++) {
if (numa_node_to_cpus(n, mask, MAX_CPUS_MASK_LEN / 8) < 0)
int mask_n_bytes = numa_all_cpus_ptr->size / 8;
if (numa_node_to_cpus(n, mask, mask_n_bytes) < 0)
goto cleanup;
for (ncpus = 0, i = 0 ; i < MAX_CPUS ; i++)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册