diff --git a/drivers/xen/privcmd.c b/drivers/xen/privcmd.c index 92a285b1b96af58d3e756ce53a1819c6eb5be86c..3b162c656205c851f8cf83788db4c9066eba04fa 100644 --- a/drivers/xen/privcmd.c +++ b/drivers/xen/privcmd.c @@ -389,7 +389,7 @@ static long privcmd_ioctl_mmap_batch(void __user *udata, int version) state.err = err_array; ret = traverse_pages(m.num, sizeof(xen_pfn_t), &pagelist, mmap_return_errors_v1, &state); - } else + } else if (version == 2) ret = __copy_to_user(m.err, err_array, m.num * sizeof(int)); /* If we have not had any EFAULT-like global errors then set the global