]> xenbits.xensource.com Git - xen.git/commit
hvm_set_ioreq_page() releases wrong page in error path
authorPaul Durrant <paul.durrant@citrix.com>
Fri, 2 May 2014 09:46:32 +0000 (11:46 +0200)
committerJan Beulich <jbeulich@suse.com>
Fri, 2 May 2014 09:46:32 +0000 (11:46 +0200)
commit16e2a7596e9fc86881c73cef57602b2c88155528
treebef1cb94ea2e51c4d4962000e51c61c7e3d1c7d0
parent427f62f1804efb0c0ddd0c14b1ca8661292f8b70
hvm_set_ioreq_page() releases wrong page in error path

The function calls prepare_ring_for_helper() to acquire a mapping for the
given gmfn, then checks (under lock) to see if the ioreq page is already
set up but, if it is, the function then releases the in-use ioreq page
mapping on the error path rather than the one it just acquired. This patch
fixes this bug.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/arch/x86/hvm/hvm.c