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

Re: [Xen-devel] [PATCH 1/2] Fix broken IOCTL_PRIVCMD_MMAPBATCH (old version).



On 16/11/12 10:47, Mats Petersson wrote:
> Most code-paths prefer the MMAPBATCH_V2, so this wasn't very obvious
> that it broke. The return value is set early on to -EINVAL, and if all
> goes well, the "set top bits of the MFN's" never gets called, so the
> return value is still EINVAL when the function gets to the end, causing
> the caller to think it went wrong (which it didn't!)

Better subject line:

"xen/privcmd: correctly return success from IOCTL_PRIVCMD_MMAPBATCH."

This is a regression introduced by ceb90fa0 (xen/privcmd: add
PRIVCMD_MMAPBATCH_V2 ioctl).  It broke xentrace as it used
xc_map_foreign() instead of xc_map_foreign_bulk().  It would be nice if
the commit message mentioned this.

> Signed off by: Mats Petersson <mats.petersson@xxxxxxxxxx>

If the subject/commit message is improved:

Acked-by: David Vrabel <david.vrabel@xxxxxxxxxx>

> --- a/drivers/xen/privcmd.c
> +++ b/drivers/xen/privcmd.c
> @@ -347,6 +347,7 @@ static long privcmd_ioctl_mmap_batch(void __user *udata, 
> int version)
>  
>       if (ret)
>               goto out;
> +

Stray change, please remove.

>       if (list_empty(&pagelist)) {
>               ret = -EINVAL;
>               goto out;

David

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