[libvirt] [PATCH] libxl: initialize vfb defbools in libxlMakeVfb
Jim Fehlig
jfehlig at suse.com
Fri Apr 17 19:40:58 UTC 2015
On 04/17/2015 11:19 AM, Olaf Hering wrote:
> If the domU configu has sdl enabled libvirtd crashes:
> libvirtd[5158]: libvirtd: libxl.c:343: libxl_defbool_val: Assertion `!libxl_defbool_is_default(db)' failed.
The assertion seems harsh considering the offense...
>
> Initialize the relevant defbool variables in libxl_device_vfb.
>
> Signed-off-by: Olaf Hering <olaf at aepfle.de>
> Cc: Jim Fehlig <jfehlig at suse.com>
> ---
>
> Seen in 1.2.14.
>
> src/libxl/libxl_conf.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/src/libxl/libxl_conf.c b/src/libxl/libxl_conf.c
> index 9b3c949..6feb7d9 100644
> --- a/src/libxl/libxl_conf.c
> +++ b/src/libxl/libxl_conf.c
> @@ -1232,6 +1232,7 @@ libxlMakeVfb(virPortAllocatorPtr graphicsports,
> switch (l_vfb->type) {
> case VIR_DOMAIN_GRAPHICS_TYPE_SDL:
> libxl_defbool_set(&x_vfb->sdl.enable, 1);
> + libxl_defbool_set(&x_vfb->vnc.enable, 0);
Not shown here, but just before the switch is
libxl_device_vfb_init(x_vfb);
which IIUC (looking at the impl in $xensrc/tools/libxl/_libxl_types.c) should
initialize the vfb struct with default values.
Regards,
Jim
> if (VIR_STRDUP(x_vfb->sdl.display, l_vfb->data.sdl.display) < 0)
> return -1;
> if (VIR_STRDUP(x_vfb->sdl.xauthority, l_vfb->data.sdl.xauth) < 0)
> @@ -1239,6 +1240,7 @@ libxlMakeVfb(virPortAllocatorPtr graphicsports,
> break;
> case VIR_DOMAIN_GRAPHICS_TYPE_VNC:
> libxl_defbool_set(&x_vfb->vnc.enable, 1);
> + libxl_defbool_set(&x_vfb->sdl.enable, 0);
> /* driver handles selection of free port */
> libxl_defbool_set(&x_vfb->vnc.findunused, 0);
> if (l_vfb->data.vnc.autoport) {
>
More information about the libvir-list
mailing list