diff options
author | smh22@uridium.cl.cam.ac.uk <smh22@uridium.cl.cam.ac.uk> | 2002-12-18 18:07:22 +0000 |
---|---|---|
committer | smh22@uridium.cl.cam.ac.uk <smh22@uridium.cl.cam.ac.uk> | 2002-12-18 18:07:22 +0000 |
commit | e1c642ea89639d8eff4cafd611542bb7bbb084ae (patch) | |
tree | a2f485d5e33d884177f06e0e280bc4e81456d580 | |
parent | f78e17d1c816a83109803d2489d52c06141c1ff4 (diff) | |
download | xen-e1c642ea89639d8eff4cafd611542bb7bbb084ae.tar.gz xen-e1c642ea89639d8eff4cafd611542bb7bbb084ae.tar.bz2 xen-e1c642ea89639d8eff4cafd611542bb7bbb084ae.zip |
bitkeeper revision 1.12 (3e00b95a3fK0b9XF_UVth6TivqeezA)
fix silly large mem request => panic death bug
-rwxr-xr-x | .bk-to-hg | 4 | ||||
-rwxr-xr-x | .hg-to-bk | 5 | ||||
-rw-r--r-- | .rootkeys | 2 | ||||
-rw-r--r-- | xen-2.4.16/common/page_alloc.c | 16 |
4 files changed, 18 insertions, 9 deletions
@@ -1,6 +1,6 @@ #!/bin/sh -x set -e -test -L foo -rm foo +test -L xenolinux-2.4.16-sparse/include/asm-xeno/hypervisor-ifs +rm xenolinux-2.4.16-sparse/include/asm-xeno/hypervisor-ifs (find -depth -type d -print | xargs -r rmdir 2>/dev/null) || true exit 0 @@ -1,5 +1,8 @@ #!/bin/sh -x set -e -ln -s ../../../xen-2.4.16/include/hypervisor-ifs/ foo +mkdir -p xenolinux-2.4.16-sparse +mkdir -p xenolinux-2.4.16-sparse/include +mkdir -p xenolinux-2.4.16-sparse/include/asm-xeno +ln -s ../../../xen-2.4.16/include/hypervisor-ifs xenolinux-2.4.16-sparse/include/asm-xeno/hypervisor-ifs (find -depth -type d -print | xargs -r rmdir 2>/dev/null) || true exit 0 @@ -1,7 +1,6 @@ 3ddb6b0bKlMz_dz-M59a1mkUa1lASw BitKeeper/etc/config 3ddb6b0buTaC5zg1_a8FoAR9FWi_mw BitKeeper/etc/ignore 3ddb79c9_hgSp-gsQm8HqWM_9W3B_A BitKeeper/etc/logging_ok -3deb3f5bhXnxocVMiXaeZ0L7fQBGaw foo 3ddb79bcbOVHh38VJzc97-JEGD4dJQ xen-2.4.16/Makefile 3ddb79bcCa2VbsMp7mWKlhgwLQUQGA xen-2.4.16/README 3ddb79bcWnTwYsQRWl_PaneJfa6p0w xen-2.4.16/Rules.mk @@ -318,6 +317,7 @@ 3ddb79batzR40ZFY9dvgs5f1aM9I6g xenolinux-2.4.16-sparse/include/asm-xeno/hdreg.h 3ddb79b90xBgbeYgCcImS2ZxJakxBA xenolinux-2.4.16-sparse/include/asm-xeno/highmem.h 3ddb79baXLZV3dUKQI2gIYpAy67RuA xenolinux-2.4.16-sparse/include/asm-xeno/hw_irq.h +3e00b957iYsdTI1x6THRwMoWSPIW2Q xenolinux-2.4.16-sparse/include/asm-xeno/hypervisor-ifs 3ddb79bapQ9Z9ewa5O1pqAVaNBTazg xenolinux-2.4.16-sparse/include/asm-xeno/hypervisor.h 3ddb79baL-pjPI8hg5xjPgd4__SlOA xenolinux-2.4.16-sparse/include/asm-xeno/i387.h 3ddb79ba66TwvG7HpbBo04fRhmj3KQ xenolinux-2.4.16-sparse/include/asm-xeno/ide.h diff --git a/xen-2.4.16/common/page_alloc.c b/xen-2.4.16/common/page_alloc.c index b7cd2c1a7b..72785c8a35 100644 --- a/xen-2.4.16/common/page_alloc.c +++ b/xen-2.4.16/common/page_alloc.c @@ -178,13 +178,19 @@ unsigned long __get_free_pages(int mask, int order) spin_lock_irqsave(&alloc_lock, flags); - /* Found smallest order which can satisfy the request. */ - for ( i = order; FREELIST_EMPTY(free_list[i]); i++ ) - { - if ( i == FREELIST_SIZE ) - panic("Out of memory!\n"); + + /* Find smallest order which can satisfy the request. */ + for ( i = order; i < FREELIST_SIZE; i++ ) { + if ( !FREELIST_EMPTY(free_list[i]) ) + break; } + if ( i == FREELIST_SIZE ) + { + printk("Cannot handle page request order %d!\n", order); + return NULL; + } + /* Unlink a chunk. */ alloc_ch = free_list[i]; free_list[i] = alloc_ch->next; |