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