From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from psmtp.com (na3sys010amx182.postini.com [74.125.245.182]) by kanga.kvack.org (Postfix) with SMTP id A19FA6B0083 for ; Tue, 22 May 2012 13:49:50 -0400 (EDT) Date: Tue, 22 May 2012 12:49:47 -0500 (CDT) From: Christoph Lameter Subject: Re: [RFC] Common code 04/12] slabs: Extract common code for kmem_cache_create In-Reply-To: Message-ID: References: <20120518161906.207356777@linux.com> <20120518161929.264565121@linux.com> MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="-1463811839-876156424-1337708989=:21828" Sender: owner-linux-mm@kvack.org List-ID: To: JoonSoo Kim Cc: Pekka Enberg , linux-mm@kvack.org, David Rientjes , Matt Mackall , Glauber Costa , Alex Shi This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. ---1463811839-876156424-1337708989=:21828 Content-Type: TEXT/PLAIN; charset=ISO-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE On Wed, 23 May 2012, JoonSoo Kim wrote: > 2012/5/19 Christoph Lameter : > > This patch has the effect of adding sanity checks for SLUB and SLOB > > under CONFIG_DEBUG_VM and removes the checks in SLAB for !CONFIG_DEBUG_= VM. > > If !CONFIG_DEBUG_VM, > code for sanity checks remain in __kmem_cache_create in slab.c, doesn't i= t? Some sanity checks remain after this patch and are moved later. > > > +#ifdef CONFIG_DEBUG_VM > > + =A0 =A0 =A0 if (!name || in_interrupt() || size < sizeof(void *) || > > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 size > KMALLOC_MAX_SIZE) { > > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 printk(KERN_ERR "kmem_cache_create(%s) in= tegrity check" > > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 " failed\n", name); > > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 goto out; > > + =A0 =A0 =A0 } > > +#endif > > Currently, when !CONFIG_DEBUG_VM, name check is handled differently in > sl[aou]bs. > slob worked with !name, but slab, slub return NULL. > So I think some change is needed for name handling. Right. All should check for !name and fail on that. ---1463811839-876156424-1337708989=:21828-- -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/ Don't email: email@kvack.org