xen/memory: Fix compat XENMEM_acquire_resource for size requests

Copy the nr_frames from the structure which actually has the correct value, so
the caller doesn't unconditionally receive 0.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Paul Durrant <paul@xen.org>
master commit: 414be7b663
master date: 2021-01-12 18:17:02 +0000
This commit is contained in:
Andrew Cooper authored and Jan Beulich committed 2021-01-21 16:25:35 +01:00
1 parent bbce51a8da
commit 1dd564515d
1 file changed
+1 -1
+1 -1
View File
@@ -599,7 +599,7 @@ int compat_memory_op(unsigned int cmd, XEN_GUEST_HANDLE_PARAM(void) compat)
if ( __copy_field_to_guest(
guest_handle_cast(compat,
compat_mem_acquire_resource_t),
&cmp.mar, nr_frames) )
nat.mar, nr_frames) )
return -EFAULT;
}
else
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.