mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 18:50:05 +01:00
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:
1 parent
bbce51a8da
commit
1dd564515d
1 file changed
+1
-1
@@ -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
|
||||
|
||||