projects
/
xen.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
82d510c
)
gnttab: fix "don't use possibly unbounded tail calls"
author
Jan Beulich
<jbeulich@suse.com>
Mon, 21 Aug 2017 13:43:36 +0000
(15:43 +0200)
committer
Jan Beulich
<jbeulich@suse.com>
Mon, 21 Aug 2017 13:43:36 +0000
(15:43 +0200)
The compat mode code also needs adjustment to deal with the changed
return value from gnttab_copy().
This is part of XSA-226.
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/common/compat/grant_table.c
patch
|
blob
|
history
diff --git
a/xen/common/compat/grant_table.c
b/xen/common/compat/grant_table.c
index f8c60a1bdf2d1bcb117189549b1ae2c75517347d..cce3ff0b9a90a53978bff6d2e4316fd4487a36b2 100644
(file)
--- a/
xen/common/compat/grant_table.c
+++ b/
xen/common/compat/grant_table.c
@@
-258,9
+258,9
@@
int compat_grant_table_op(unsigned int cmd,
rc = gnttab_copy(guest_handle_cast(nat.uop, gnttab_copy_t), n);
if ( rc > 0 )
{
- ASSERT(rc < n);
- i -=
n -
rc;
- n = rc;
+ ASSERT(rc <
=
n);
+ i -= rc;
+ n
-
= rc;
}
if ( rc >= 0 )
{