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

[Xen-changelog] [xen-unstable] x86: properly fail mmuext ops when get_page_from_gfn() fails


  • To: xen-changelog@xxxxxxxxxxxxxxxxxxx
  • From: Xen patchbot-unstable <patchbot@xxxxxxx>
  • Date: Tue, 11 Dec 2012 04:33:22 +0000
  • Delivery-date: Tue, 11 Dec 2012 04:33:27 +0000
  • List-id: "Change log for Mercurial \(receive only\)" <xen-changelog.lists.xen.org>

# HG changeset patch
# User Jan Beulich <jbeulich@xxxxxxxx>
# Date 1354884046 -3600
# Node ID e80bac7c6598d4b4e1d3c89589ba71b498c7dcc8
# Parent  12d2786dc549b4944d58d1e347ac423842d1259d
x86: properly fail mmuext ops when get_page_from_gfn() fails

I noticed this inconsistency while analyzing the code for XSA-32.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
Acked-by: Keir Fraser <keir@xxxxxxx>
---


diff -r 12d2786dc549 -r e80bac7c6598 xen/arch/x86/mm.c
--- a/xen/arch/x86/mm.c Thu Dec 06 16:59:27 2012 +0000
+++ b/xen/arch/x86/mm.c Fri Dec 07 13:40:46 2012 +0100
@@ -2776,7 +2776,7 @@ long do_mmuext_op(
             page = get_page_from_gfn(pg_owner, op.arg1.mfn, NULL, P2M_ALLOC);
             if ( unlikely(!page) )
             {
-                rc = -EINVAL;
+                okay = 0;
                 break;
             }
 
@@ -2836,6 +2836,7 @@ long do_mmuext_op(
             page = get_page_from_gfn(pg_owner, op.arg1.mfn, NULL, P2M_ALLOC);
             if ( unlikely(!page) )
             {
+                okay = 0;
                 MEM_LOG("Mfn %lx bad domain", op.arg1.mfn);
                 break;
             }

_______________________________________________
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®.