ia64/xen-unstable

changeset 9581:9ae1f9349b76

fix mfn check of gnttab_transfer().

Signed-off-by: Steven Smith, sos22@cam.ac.uk
From: Isaku Yamahata <yamahata@valinux.co.jp>
author sos22@douglas.cl.cam.ac.uk
date Tue Apr 04 14:04:32 2006 +0100 (2006-04-04)
parents 395e57314710
children 887ff2d1e382
files xen/common/grant_table.c
line diff
     1.1 --- a/xen/common/grant_table.c	Tue Apr 04 11:08:20 2006 +0100
     1.2 +++ b/xen/common/grant_table.c	Tue Apr 04 14:04:32 2006 +0100
     1.3 @@ -618,8 +618,10 @@ gnttab_transfer(
     1.4              return -EFAULT;
     1.5          }
     1.6  
     1.7 +        mfn = gmfn_to_mfn(d, gop.mfn);
     1.8 +
     1.9          /* Check the passed page frame for basic validity. */
    1.10 -        if ( unlikely(!mfn_valid(gop.mfn)) )
    1.11 +        if ( unlikely(!mfn_valid(mfn)) )
    1.12          { 
    1.13              DPRINTK("gnttab_transfer: out-of-range %lx\n",
    1.14                      (unsigned long)gop.mfn);
    1.15 @@ -627,7 +629,6 @@ gnttab_transfer(
    1.16              goto copyback;
    1.17          }
    1.18  
    1.19 -        mfn = gmfn_to_mfn(d, gop.mfn);
    1.20          page = mfn_to_page(mfn);
    1.21          if ( unlikely(IS_XEN_HEAP_FRAME(page)) )
    1.22          {