[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen stable-4.2] hvm_set_ioreq_page() releases wrong page in error path



commit ad109e48142ba887fa7721ca58deea2d6c493053
Author:     Paul Durrant <paul.durrant@xxxxxxxxxx>
AuthorDate: Mon May 12 17:42:33 2014 +0200
Commit:     Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Mon May 12 17:42:33 2014 +0200

    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@xxxxxxxxxx>
    Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>
    Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
    master commit: 16e2a7596e9fc86881c73cef57602b2c88155528
    master date: 2014-05-02 11:46:32 +0200
---
 xen/arch/x86/hvm/hvm.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/xen/arch/x86/hvm/hvm.c b/xen/arch/x86/hvm/hvm.c
index a0e7d79..68531ab 100644
--- a/xen/arch/x86/hvm/hvm.c
+++ b/xen/arch/x86/hvm/hvm.c
@@ -446,7 +446,7 @@ static int hvm_set_ioreq_page(
 
     if ( (iorp->va != NULL) || d->is_dying )
     {
-        destroy_ring_for_helper(&iorp->va, iorp->page);
+        destroy_ring_for_helper(&va, page);
         spin_unlock(&iorp->lock);
         return -EINVAL;
     }
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.2

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.