mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 18:50:05 +01:00
xl: handle empty vnuma configuration
When user specifies vnuma = [], we need to skip the whole parser function, otherwise the parser sets b_info->max_memkb to garbage value. Signed-off-by: Wei Liu <wei.liu2@citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com>
This commit is contained in:
1 parent
fa6b5490be
commit
ebe3fd9e73
1 file changed
+3
@@ -1093,6 +1093,9 @@ static void parse_vnuma_config(const XLU_Config *config,
|
||||
if (xlu_cfg_get_list(config, "vnuma", &vnuma, &num_vnuma, 1))
|
||||
return;
|
||||
|
||||
if (!num_vnuma)
|
||||
return;
|
||||
|
||||
b_info->num_vnuma_nodes = num_vnuma;
|
||||
b_info->vnuma_nodes = xcalloc(num_vnuma, sizeof(libxl_vnode_info));
|
||||
vcpu_parsed = xcalloc(num_vnuma, sizeof(libxl_bitmap));
|
||||
|
||||