libxl: don't segfault when creating domain with invalid pvusb device
authorJuergen Gross <jgross@suse.com>
Wed, 8 Feb 2017 13:34:08 +0000 (14:34 +0100)
committerWei Liu <wei.liu2@citrix.com>
Wed, 8 Feb 2017 15:00:02 +0000 (15:00 +0000)
commit58b4db0832de1ee355a342feea7e1545219bef12
treed3d1c990f84407f5b859675bd749ad74dff20989
parentc562d7a2f5efd3716ab0b70c0c4d1dbebb55a215
libxl: don't segfault when creating domain with invalid pvusb device

Creating a domain with an invalid controller specification for a pvusb
device will currently segfault.

Avoid this by bailing out early in case of a mandatory xenstore path
not existing.

Signed-of-by: Juergen Gross <jgross@suse.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
tools/libxl/libxl_internal.h
tools/libxl/libxl_usb.c
tools/libxl/libxl_xshelp.c