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

Re: [Xen-devel] [PATCH 08/14] libxl: Fix xc_tmem_control to return proper error.



On Wed, 2015-03-18 at 13:37 -0400, Konrad Rzeszutek Wilk wrote:
> > Or alternatively fix the return type of xc_tmem_control.
> > 
> > > -
> > > + node->freeable_mb = (rc < 0) ? 0 : rc;
> > 
> > Should rc not get propagated into an error for the caller?
> 
> Nope. If tmem is not enabled (so xc_tmem_control returns -ENOSYS)

I think after these changes you mean returns -1 with errno == -ENOSYS?

> freeable_mb should be zero. In this case we would have returned negative
> values which is certainly not right.

What about other possible error codes from xc_tmem_control? At the least
it appears it can return with errno=ENOMEM (from the hypercall buffer
usage).

Ian.


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