projects
/
xen.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0db1ded
)
xen/memory: Fix compat XENMEM_acquire_resource for size requests
author
Andrew Cooper
<andrew.cooper3@citrix.com>
Tue, 28 Jul 2020 10:23:54 +0000
(11:23 +0100)
committer
Andrew Cooper
<andrew.cooper3@citrix.com>
Tue, 12 Jan 2021 18:17:02 +0000
(18:17 +0000)
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>
xen/common/compat/memory.c
patch
|
blob
|
history
diff --git
a/xen/common/compat/memory.c
b/xen/common/compat/memory.c
index 3851f756c7b8865719322080e02d61dcf6e70a78..ed92e05b083377405ce14d1c414015ff37c9fa36 100644
(file)
--- a/
xen/common/compat/memory.c
+++ b/
xen/common/compat/memory.c
@@
-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