[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v1 09/12] tmem: Check version and maxpools when XEN_SYSCTL_TMEM_SET_CLIENT_INFO
>>> On 28.09.16 at 11:42, <konrad.wilk@xxxxxxxxxx> wrote: > --- a/xen/common/tmem_control.c > +++ b/xen/common/tmem_control.c > @@ -270,6 +270,12 @@ static int __tmemc_set_var(struct client *client, > if ( copy_from_guest(&info, buf, 1) ) > return -EFAULT; > > + if ( info.version != TMEM_SPEC_VERSION ) > + return -EOPNOTSUPP; > + > + if ( info.maxpools > MAX_POOLS_PER_DOMAIN ) > + return -ERANGE; Ah, here we go. But ... > --- a/xen/include/public/sysctl.h > +++ b/xen/include/public/sysctl.h > @@ -787,8 +787,9 @@ struct tmem_handle { > * during migration. > */ > struct tmem_client { > - uint32_t version; > - uint32_t maxpools; > + uint32_t version; /* If mismatched we will get XEN_ENOSPC. */ > + uint32_t maxpools; /* If greater than what hypervisor supports, will get > + XEN_ERANGE. */ ... while the latter comment matches the code, the former doesn't. Jan _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |