xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Julien Grall <julien.grall@arm.com>
To: Ian Jackson <ian.jackson@eu.citrix.com>,
	Robin Lee <robinlee.sysu@gmail.com>
Cc: wei.liu2@citrix.com, Xen-devel@lists.xen.org
Subject: Re: [for-4.9] Re: [PATCH v2] libxl/libxl_dm.c: u.hvm.usbdevice_list is checked for emptiness
Date: Mon, 8 May 2017 11:36:13 +0100	[thread overview]
Message-ID: <3fc7051a-e6ae-89e1-caa5-a7da60b2577a@arm.com> (raw)
In-Reply-To: <22800.16488.804888.310906@mariner.uk.xensource.com>

Hi Ian,

On 08/05/17 10:54, Ian Jackson wrote:
> Robin Lee writes ("[PATCH v2] libxl/libxl_dm.c: u.hvm.usbdevice_list is checked for emptiness"):
>> Currently usbdevice_list is only checked for nullity. But the OCaml binding
>> will convert empty list to a pointer to NULL, instead of a NULL pointer. That
>> means the OCaml binding will fail to disable USB.
>>
>> This patch will check emptiness of usbdevice_list. And NULL is still a valid empty list.
>
> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
>
> Julien, this is a candidate for 4.9.  It's a minor bugfix.

Release-acked-by: Julien Grall <julien.grall@arm.com>

>
> Ian.
>
>>  tools/libxl/libxl_dm.c | 12 ++++++------
>>  1 file changed, 6 insertions(+), 6 deletions(-)
>>
>> diff --git a/tools/libxl/libxl_dm.c b/tools/libxl/libxl_dm.c
>> index f8ba859..44ebd70 100644
>> --- a/tools/libxl/libxl_dm.c
>> +++ b/tools/libxl/libxl_dm.c
>> @@ -559,9 +559,9 @@ static int libxl__build_device_model_args_old(libxl__gc *gc,
>>          }
>>          if (libxl_defbool_val(b_info->u.hvm.usb)
>>              || b_info->u.hvm.usbdevice
>> -            || b_info->u.hvm.usbdevice_list) {
>> -            if ( b_info->u.hvm.usbdevice && b_info->u.hvm.usbdevice_list )
>> -            {
>> +            || libxl_string_list_length(&b_info->u.hvm.usbdevice_list)) {
>> +            if (b_info->u.hvm.usbdevice
>> +                && libxl_string_list_length(&b_info->u.hvm.usbdevice_list)) {
>>                  LOGD(ERROR, domid, "Both usbdevice and usbdevice_list set");
>>                  return ERROR_INVAL;
>>              }
>> @@ -1149,9 +1149,9 @@ static int libxl__build_device_model_args_new(libxl__gc *gc,
>>          }
>>          if (libxl_defbool_val(b_info->u.hvm.usb)
>>              || b_info->u.hvm.usbdevice
>> -            || b_info->u.hvm.usbdevice_list) {
>> -            if ( b_info->u.hvm.usbdevice && b_info->u.hvm.usbdevice_list )
>> -            {
>> +            || libxl_string_list_length(&b_info->u.hvm.usbdevice_list)) {
>> +            if (b_info->u.hvm.usbdevice
>> +                && libxl_string_list_length(&b_info->u.hvm.usbdevice_list)) {
>>                  LOGD(ERROR, guest_domid, "Both usbdevice and usbdevice_list set");
>>                  return ERROR_INVAL;
>>              }
>> --
>> 2.9.3
>>

-- 
Julien Grall

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

  reply	other threads:[~2017-05-08 10:36 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-05 19:02 [PATCH v2] libxl/libxl_dm.c: u.hvm.usbdevice_list is checked for emptiness Robin Lee
2017-05-08  9:54 ` [for-4.9] " Ian Jackson
2017-05-08 10:36   ` Julien Grall [this message]
2017-05-08 13:51     ` Ian Jackson

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=3fc7051a-e6ae-89e1-caa5-a7da60b2577a@arm.com \
    --to=julien.grall@arm.com \
    --cc=Xen-devel@lists.xen.org \
    --cc=ian.jackson@eu.citrix.com \
    --cc=robinlee.sysu@gmail.com \
    --cc=wei.liu2@citrix.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).