From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pekka Enberg Subject: Re: ia64 dies in slab code on next-20120906 Date: Mon, 10 Sep 2012 09:59:26 +0300 (EEST) Message-ID: References: <20120907112606.7d09e84c4782b748a95e1946@canb.auug.org.au> <00000139a722a761-bafedf19-81a0-4922-a522-a2bb0fbb951a-000000@email.amazonses.com> <20120910132416.cf70afde92399a420b74bd32@canb.auug.org.au> Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Return-path: Received: from mail-lpp01m010-f46.google.com ([209.85.215.46]:45971 "EHLO mail-lpp01m010-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751420Ab2IJG7c (ORCPT ); Mon, 10 Sep 2012 02:59:32 -0400 Received: by lagy9 with SMTP id y9so882907lag.19 for ; Sun, 09 Sep 2012 23:59:30 -0700 (PDT) In-Reply-To: <20120910132416.cf70afde92399a420b74bd32@canb.auug.org.au> Sender: linux-next-owner@vger.kernel.org List-ID: To: Stephen Rothwell Cc: Christoph Lameter , Tony Luck , linux-next@vger.kernel.org, Sedat Dilek , Hugh Dickins On Mon, 10 Sep 2012, Stephen Rothwell wrote: > Hi Christoph, > > On Sat, 8 Sep 2012 18:27:10 +0000 Christoph Lameter wrote: > > > > Thanks Tony for the additional information regarding the pointer. That got > > me thinking about something different. > > > > Try the following fix: > > > > Subject: slub: Zero initial memory segment for kmem_cache and kmem_cache_node > > > > Earlier patches in the common set moved the zeroing of the kmem_cache structure > > into common code. See "Move allocation of kmem_cache into common code". > > > > The allocation for the two special structures is still done > > from slub specific code but no zeroing is done since the cache creation functions > > used to zero. This now needs to be updated so that the structures > > are zeroed during allocation in kmem_cache_init(). > > Otherwise random pointer values may be followed. > > > > Signed-off-by: Christoph Lameter > > > > Index: linux/mm/slub.c > > =================================================================== > > --- linux.orig/mm/slub.c 2012-09-08 13:21:33.523056357 -0500 > > +++ linux/mm/slub.c 2012-09-08 13:22:12.483056947 -0500 > > @@ -3705,7 +3705,7 @@ > > /* Allocate two kmem_caches from the page allocator */ > > kmalloc_size = ALIGN(kmem_size, cache_line_size()); > > order = get_order(2 * kmalloc_size); > > - kmem_cache = (void *)__get_free_pages(GFP_NOWAIT, order); > > + kmem_cache = (void *)__get_free_pages(GFP_NOWAIT|__GFP_ZERO, order); > > > > /* > > * Must first have the slab cache available for the allocations of the > > > > I have added this as a merge fix patch to linux-next today in the > anticipation that it will be added to the slab tree ASAP. I've applied the patch. Thanks everyone!