Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2992528AbWJTRsB (ORCPT ); Fri, 20 Oct 2006 13:48:01 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S2992530AbWJTRsB (ORCPT ); Fri, 20 Oct 2006 13:48:01 -0400 Received: from omx1-ext.sgi.com ([192.48.179.11]:15775 "EHLO omx1.americas.sgi.com") by vger.kernel.org with ESMTP id S2992528AbWJTRsA (ORCPT ); Fri, 20 Oct 2006 13:48:00 -0400 Date: Fri, 20 Oct 2006 10:46:13 -0700 (PDT) From: Christoph Lameter To: Andrew Morton cc: Andy Whitcroft , Paul Mackerras , Anton Blanchard , linuxppc-dev@ozlabs.org, linux-kernel@vger.kernel.org, Mel Gorman , Mike Kravetz , will_schmidt@vnet.ibm.com, Jeff Garzik Subject: Re: kernel BUG in __cache_alloc_node at linux-2.6.git/mm/slab.c:3177! In-Reply-To: <20061020100904.ed1fa0af.akpm@osdl.org> Message-ID: References: <1161026409.31903.15.camel@farscape> <1161031821.31903.28.camel@farscape> <17717.50596.248553.816155@cargo.ozlabs.ibm.com> <17718.39522.456361.987639@cargo.ozlabs.ibm.com> <17719.1849.245776.4501@cargo.ozlabs.ibm.com> <20061019163044.GB5819@krispykreme> <17719.64246.555371.701194@cargo.ozlabs.ibm.com> <17720.30804.180390.197567@cargo.ozlabs.ibm.com> <4538DACC.5050605@shadowen.org> <4538F2A2.5040305@shadowen.org> <20061020100904.ed1fa0af.akpm@osdl.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1632 Lines: 45 Here is the patch: Slab: Do not fallback to nodes that have not been bootstrapped yet The zonelist may contain zones of nodes that have not been bootstrapped and we will oops if we try to allocate from those zones. So check if the node information for the slab and the node have been setup before attempting an allocation. If it has not been setup then skip that zone. Usually we will not encounter this situation since the slab bootstrap code avoids falling back before we have setup the respective nodes but we seem to have a special needs for pppc. Signed-off-by: Christoph Lameter Index: linux-2.6.19-rc2-mm1/mm/slab.c =================================================================== --- linux-2.6.19-rc2-mm1.orig/mm/slab.c 2006-10-20 12:39:02.000000000 -0500 +++ linux-2.6.19-rc2-mm1/mm/slab.c 2006-10-20 12:41:04.137684581 -0500 @@ -3160,12 +3160,15 @@ void *fallback_alloc(struct kmem_cache * struct zone **z; void *obj = NULL; - for (z = zonelist->zones; *z && !obj; z++) + for (z = zonelist->zones; *z && !obj; z++) { + int nid = zone_to_nid(*z); + if (zone_idx(*z) <= ZONE_NORMAL && - cpuset_zone_allowed(*z, flags)) + cpuset_zone_allowed(*z, flags) && + cache->nodelists[nid]) obj = __cache_alloc_node(cache, - flags | __GFP_THISNODE, - zone_to_nid(*z)); + flags | __GFP_THISNODE, nid); + } return obj; } - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/