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

[Xen-changelog] fix mfn check of gnttab_transfer().



# HG changeset patch
# User sos22@xxxxxxxxxxxxxxxxxxxx
# Node ID 9ae1f9349b76ac0ff9e2dd34ff071450e8c6797d
# Parent  395e57314710c0c8d21e3ebc695f17ef6b93709d
fix mfn check of gnttab_transfer().

Signed-off-by: Steven Smith, sos22@xxxxxxxxx
From: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>

diff -r 395e57314710 -r 9ae1f9349b76 xen/common/grant_table.c
--- a/xen/common/grant_table.c  Tue Apr  4 10:08:20 2006
+++ b/xen/common/grant_table.c  Tue Apr  4 13:04:32 2006
@@ -618,8 +618,10 @@
             return -EFAULT;
         }
 
+        mfn = gmfn_to_mfn(d, gop.mfn);
+
         /* Check the passed page frame for basic validity. */
-        if ( unlikely(!mfn_valid(gop.mfn)) )
+        if ( unlikely(!mfn_valid(mfn)) )
         { 
             DPRINTK("gnttab_transfer: out-of-range %lx\n",
                     (unsigned long)gop.mfn);
@@ -627,7 +629,6 @@
             goto copyback;
         }
 
-        mfn = gmfn_to_mfn(d, gop.mfn);
         page = mfn_to_page(mfn);
         if ( unlikely(IS_XEN_HEAP_FRAME(page)) )
         { 

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
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®.