ia64/xen-unstable

changeset 1083:82350f1a3ece

bitkeeper revision 1.718 (402ab0a3yYoCQu7SoJnkkWLDqd6w4Q)

memory.c:
Fix refcnt bug in Xen.
author kaf24@scramble.cl.cam.ac.uk
date Wed Feb 11 22:45:55 2004 +0000 (2004-02-11)
parents 143de83a34dd
children 35e9a7d31995
files xen/common/memory.c
line diff
     1.1 --- a/xen/common/memory.c	Wed Feb 11 17:43:44 2004 +0000
     1.2 +++ b/xen/common/memory.c	Wed Feb 11 22:45:55 2004 +0000
     1.3 @@ -832,10 +832,12 @@ static int do_extended_command(unsigned 
     1.4                                              &page->count_and_flags)) )
     1.5          {
     1.6              put_page_and_type(page);
     1.7 +            put_page(page);
     1.8          }
     1.9          else
    1.10          {
    1.11              okay = 0;
    1.12 +            put_page(page);
    1.13              MEM_LOG("Pfn %08lx not pinned", pfn);
    1.14          }
    1.15          break;
    1.16 @@ -932,6 +934,12 @@ int do_mmu_update(mmu_update_t *ureqs, i
    1.17          case MMU_NORMAL_PT_UPDATE:
    1.18              page = &frame_table[pfn];
    1.19  
    1.20 +            if ( unlikely(pfn >= max_page) )
    1.21 +            {
    1.22 +                MEM_LOG("Page out of range (%08lx > %08lx)", pfn, max_page);
    1.23 +                break;
    1.24 +            }
    1.25 +
    1.26              if ( unlikely(!get_page(page, current)) &&
    1.27                   ((current->domain != 0) || !dom0_get_page(page)) )
    1.28              {