|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v6 02/24] xen/xsplice: Hypervisor implementation of XEN_XSPLICE_op
> +static int xsplice_list(xen_sysctl_xsplice_list_t *list)
> +{
> + xen_xsplice_status_t status;
> + struct payload *data;
> + unsigned int idx = 0, i = 0;
> + int rc = 0;
> +
> + if ( list->nr > 1024 )
> + return -E2BIG;
> +
> + if ( list->pad )
> + return -EINVAL;
> +
> + if ( list->nr &&
> + (!guest_handle_okay(list->status, list->nr) ||
> + !guest_handle_okay(list->name, XEN_XSPLICE_NAME_SIZE * list->nr) ||
> + !guest_handle_okay(list->len, list->nr)) )
> + return -EINVAL;
> +
> + spin_lock(&payload_lock);
> + if ( list->idx >= payload_cnt )
This should have && payload_cnt.
On startup payload_cnt is zero and the toolstack will start with list->idx=0
as well. Which will lead to the '=' and .. well we get an -EINVAL when
trying xen-xsplice list when there are no patches.
Above change was introduced in v6 and I hadn't caught it before posting as
my tests go straight in patching the hypervisor, not listing the state when
there is nothing there :-)
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |