On 07/04/16 11:40, Chunyan Liu wrote: > Missing a check of controller type. > > Signed-off-by: Chunyan Liu <cy...@suse.com> > CC: Simon Cao <caobosi...@gmail.com> > CC: George Dunlap <george.dun...@citrix.com> > CC: Ian Jackson <ian.jack...@eu.citrix.com> > CC: Juergen Gross <jgr...@suse.com>
Reviewed-by: Juergen Gross <jgr...@suse.com> > --- > This affects Juergen's qusb patch too. Fix that together. This patch > could be applied on top of Juergen's qusb backend patch. > > tools/libxl/libxl_pvusb.c | 7 +++++++ > 1 file changed, 7 insertions(+) > > diff --git a/tools/libxl/libxl_pvusb.c b/tools/libxl/libxl_pvusb.c > index 02d3e55..6447639 100644 > --- a/tools/libxl/libxl_pvusb.c > +++ b/tools/libxl/libxl_pvusb.c > @@ -811,6 +811,13 @@ static int libxl__device_usbdev_setdefault(libxl__gc *gc, > } > } > > + if (usbctrl->type != LIBXL_USBCTRL_TYPE_PV && > + usbctrl->type != LIBXL_USBCTRL_TYPE_QUSB) { > + LOG(ERROR, "Unsupported USB controller type"); > + rc = ERROR_FAIL; > + goto out; > + } > + > rc = libxl__device_usbctrl_add_xenstore(gc, domid, usbctrl, > update_json); > if (rc) goto out; > _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel