projects
/
xen.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2f80ac9
)
fix compat memory exchange op splitting
author
Jan Beulich
<jbeulich@suse.com>
Fri, 1 Mar 2013 15:59:49 +0000
(16:59 +0100)
committer
Jan Beulich
<jbeulich@suse.com>
Fri, 1 Mar 2013 15:59:49 +0000
(16:59 +0100)
A shift with a negative count was erroneously used here, yielding
undefined behavior.
Reported-by: Xi Wang <xi@mit.edu>
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Keir Fraser <keir@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 e0fc20524cd0bc8eda25382d863c50417a7860b5..caa24ccbe6a7ee6af32b888adcb88872c1e2c6fa 100644
(file)
--- a/
xen/common/compat/memory.c
+++ b/
xen/common/compat/memory.c
@@
-172,7
+172,7
@@
int compat_memory_op(unsigned int cmd, XEN_GUEST_HANDLE_PARAM(void) compat)
if ( order_delta >= 0 )
nat.xchg->out.nr_extents = end_extent >> order_delta;
else
- nat.xchg->out.nr_extents = end_extent << order_delta;
+ nat.xchg->out.nr_extents = end_extent <<
-
order_delta;
++split;
}