ia64/xen-unstable

changeset 19419:bbfcea821a0d

Do not pass DIRECTMAP_VIRT_END to virt_to_mfn(). It's out of range.

Signed-off-by: Xiaowei Yang <xiaowei.yang@intel.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Fri Mar 20 09:34:09 2009 +0000 (2009-03-20)
parents abb87a8387ac
children 115c164721dc
files xen/common/page_alloc.c
line diff
     1.1 --- a/xen/common/page_alloc.c	Fri Mar 20 09:10:55 2009 +0000
     1.2 +++ b/xen/common/page_alloc.c	Fri Mar 20 09:34:09 2009 +0000
     1.3 @@ -299,7 +299,7 @@ static unsigned long init_node_heap(int 
     1.4      }
     1.5  #ifdef DIRECTMAP_VIRT_END
     1.6      else if ( nr >= needed &&
     1.7 -              mfn + needed <= virt_to_mfn(DIRECTMAP_VIRT_END) )
     1.8 +              (mfn + needed) <= (virt_to_mfn(DIRECTMAP_VIRT_END - 1) + 1) )
     1.9      {
    1.10          _heap[node] = mfn_to_virt(mfn);
    1.11          avail[node] = mfn_to_virt(mfn + needed) - sizeof(**avail) * NR_ZONES;