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

Re: [Xen-devel] Possible bug in function libxl.c interface in the function libxl_wait_for_memory_target()



Yes sure.

Regards,
Ayush Ruia.

On Sun, Oct 5, 2014 at 6:02 AM, Wei Liu <wei.liu2@xxxxxxxxxx> wrote:
On Sun, Oct 05, 2014 at 01:01:19AM -0500, ayush ruia wrote:
> Hi all,
> The following code function might possibly return an incorrect value in the
> case of the target memory not meeting the required value after waiting for
> a given time period. Quoting the following lines from the xen git
> repository
> http://xenbits.xen.org/gitweb/?p=xen.git;a=blob;f=tools/libxl/libxl.c;h=77672d06bac0636c3c9f8d5ab0475ab796246f7c;hb=HEAD
>
>
> 4697Â Â Âif ((info.current_memkb + info.outstanding_memkb) <= target_memkb)
> 4698Â Â Â Â Ârc = 0;
> 4699Â Â Âelse
> 4700Â Â Â Â Ârc = ERROR_FAIL;
> 4701
> 4702 out:
> 4703Â Â Âreturn 0;
> 4704 }
>
> Here we calculate the return value and in the case of failure it should be
> ERROR_FAIL . However we still return the value 0. Thus possibly this
> function will still return 0 in the event of an error.
>

Yes, I think you've discovered a bug.

Would you like to submit a patch to fix it?

You can find instructions on patch submission on the following page

http://wiki.xen.org/wiki/Submitting_Xen_Project_Patches

Wei.

>
>
>
> Regards,
> Ayush Ruia.

> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxx
> http://lists.xen.org/xen-devel


_______________________________________________
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®.