[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 4/4] fix a pvusb type check



On 07/04/16 11:40, Chunyan Liu wrote:
> Missing a check of controller type.
> 
> Signed-off-by: Chunyan Liu <cyliu@xxxxxxxx>
> CC: Simon Cao <caobosimon@xxxxxxxxx>
> CC: George Dunlap <george.dunlap@xxxxxxxxxx>
> CC: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
> CC: Juergen Gross <jgross@xxxxxxxx>

Reviewed-by: Juergen Gross <jgross@xxxxxxxx>

> ---
> 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@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.