libxc: fix unmap of ACPI guest memory region
authorRoger Pau Monne <roger.pau@citrix.com>
Tue, 8 Nov 2016 16:22:15 +0000 (17:22 +0100)
committerWei Liu <wei.liu2@citrix.com>
Fri, 11 Nov 2016 01:10:10 +0000 (01:10 +0000)
commit88f21a0c2a4c8d59cf25ba2d6e6f13d6ce5a42ae
tree952ca31e2c1790969ed9decdd7e819a036e65929
parent0a34e43d0f74ecaf815bf094443925857b9e83a1
libxc: fix unmap of ACPI guest memory region

Commit fac7f7 changed the value of ptr so that it points to the right memory
area, taking the page offset into account, but failed to remove this when
doing the unmap, which caused the region to not be unmapped. Fix this by not
modifying ptr and instead adding the page offset directly in the memcpy
call.

Coverity-ID: 1394285

Reported-by: Andrew Cooper <andrew.cooper3@citrix.com>
Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
Release-acked-by: Wei Liu <wei.liu2@citrix.com>
tools/libxc/xc_dom_core.c