--- mm/page_alloc.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) Index: linux-2.6.25-rc5-mm1/mm/page_alloc.c =================================================================== --- linux-2.6.25-rc5-mm1.orig/mm/page_alloc.c 2008-03-20 17:50:19.924653536 -0700 +++ linux-2.6.25-rc5-mm1/mm/page_alloc.c 2008-03-20 18:00:32.876551175 -0700 @@ -77,7 +77,7 @@ int pageblock_order __read_mostly; static void __free_pages_ok(struct page *page, unsigned int order); static struct page *alloc_vcompound(gfp_t, nodemask_t *, int, - struct zonelist *, int, unsigned long); + struct zonelist *, int, unsigned long, void *caller); static void destroy_compound_page(struct page *page, unsigned long order); /* @@ -370,9 +370,9 @@ static void prep_compound_page(struct pa int i; int nr_pages = 1 << order; + __SetPageHead(page); set_compound_page_dtor(page, free_compound_page); set_compound_order(page, order); - __SetPageHead(page); for (i = 1; i < nr_pages; i++) { struct page *p = compound_nth_page(page, i); @@ -1528,7 +1528,8 @@ zonelist_scan: if ((gfp_mask & __GFP_VFALLBACK) && system_state == SYSTEM_RUNNING) return alloc_vcompound(gfp_mask, nodemask, order, - zonelist, high_zoneidx, alloc_flags); + zonelist, high_zoneidx, alloc_flags, + __builtin_return_address(0)); #endif page = buffered_rmqueue(preferred_zone, zone, order, gfp_mask); @@ -1621,7 +1622,7 @@ static void set_page_owner(struct page * */ static noinline struct page *alloc_vcompound(gfp_t gfp_mask, nodemask_t *nodemask, int order, struct zonelist *zonelist, - int high_zoneidx, unsigned long alloc_flags) + int high_zoneidx, unsigned long alloc_flags, void *caller) { struct page *page; int i; @@ -1652,7 +1653,7 @@ static noinline struct page *alloc_vcomp vm = get_vm_area_node(nr_pages << PAGE_SHIFT, VM_VCOMPOUND, zone_to_nid(zonelist_zone(zonelist->_zonerefs)), gfp_mask); - vm->caller = __builtin_return_address(0); + vm->caller = caller; pages2 = pages; if (map_vm_area(vm, PAGE_KERNEL, &pages2)) goto abort; @@ -1763,7 +1764,8 @@ restart: if (!page && order && (gfp_mask & __GFP_VFALLBACK)) page = alloc_vcompound(gfp_mask, nodemask, order, - zonelist, high_zoneidx, alloc_flags); + zonelist, high_zoneidx, alloc_flags, + __builtin_return_address(0)); /* This allocation should allow future memory freeing. */ @@ -1867,7 +1869,8 @@ try_vcompound: /* Last chance before failing the allocation */ if (order && (gfp_mask & __GFP_VFALLBACK)) { page = alloc_vcompound(gfp_mask, nodemask, order, - zonelist, high_zoneidx, alloc_flags); + zonelist, high_zoneidx, alloc_flags, + __builtin_return_address(0)); if (page) goto got_pg; }