All of lore.kernel.org
 help / color / mirror / Atom feed
From: Juergen Gross <jgross@suse.com>
To: Chunyan Liu <cyliu@suse.com>, xen-devel@lists.xen.org
Cc: Simon Cao <caobosimon@gmail.com>,
	Ian Jackson <Ian.Jackson@eu.citrix.com>,
	George Dunlap <george.dunlap@citrix.com>
Subject: Re: [PATCH 4/4] fix a pvusb type check
Date: Thu, 7 Apr 2016 11:47:44 +0200	[thread overview]
Message-ID: <57062CC0.9080506@suse.com> (raw)
In-Reply-To: <1460022028-25174-5-git-send-email-cyliu@suse.com>

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

Reviewed-by: Juergen Gross <jgross@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

      reply	other threads:[~2016-04-07  9:47 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-07  9:40 [PATCH 0/4] pvusb fixes Chunyan Liu
2016-04-07  9:40 ` [PATCH 1/4] a fix in libxl_device_usbdev_list Chunyan Liu
2016-04-07 16:45   ` Ian Jackson
2016-04-08  3:47     ` Chun Yan Liu
2016-04-08 13:28       ` Ian Jackson
2016-04-08 13:30         ` Ian Jackson
2016-04-07 16:50   ` Ian Jackson
2016-04-07  9:40 ` [PATCH 2/4] correct libxl_write_exactly sizeof Chunyan Liu
2016-04-07 16:46   ` Ian Jackson
2016-04-07  9:40 ` [PATCH 3/4] cleanup redundant lstat in libxl_pvusb.c Chunyan Liu
2016-04-07 16:47   ` Ian Jackson
2016-04-07  9:40 ` [PATCH 4/4] fix a pvusb type check Chunyan Liu
2016-04-07  9:47   ` Juergen Gross [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=57062CC0.9080506@suse.com \
    --to=jgross@suse.com \
    --cc=Ian.Jackson@eu.citrix.com \
    --cc=caobosimon@gmail.com \
    --cc=cyliu@suse.com \
    --cc=george.dunlap@citrix.com \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.