mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 18:50:05 +01:00
gnttab: fix "don't use possibly unbounded tail calls"
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>
This commit is contained in:
1 parent
82d510c88d
commit
ca61757054
1 file changed
+3
-3
@@ -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 )
|
||||
{
|
||||
|
||||