From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from psmtp.com (na3sys010amx138.postini.com [74.125.245.138]) by kanga.kvack.org (Postfix) with SMTP id 572CA6B0005 for ; Fri, 25 Jan 2013 09:53:31 -0500 (EST) Date: Fri, 25 Jan 2013 14:53:29 +0000 From: Christoph Lameter Subject: Re: FIX [1/2] slub: Do not dereference NULL pointer in node_match In-Reply-To: <1359101516.16101.6.camel@kernel> Message-ID: <0000013c7232fa91-a8f59c62-a7c6-4937-89b9-8c53d86df7b1-000000@email.amazonses.com> References: <20130123214514.370647954@linux.com> <0000013c695fbd30-9023bc55-f780-4d44-965f-ab4507e483d5-000000@email.amazonses.com> <1358988824.3351.5.camel@kernel> <0000013c6d200e1d-03ae09c1-6fb8-42eb-ab6c-8fcae05fdb6e-000000@email.amazonses.com> <1359101516.16101.6.camel@kernel> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-linux-mm@kvack.org List-ID: To: Simon Jeons Cc: Pekka Enberg , Steven Rostedt , Thomas Gleixner , RT , Clark Williams , John Kacur , "Luis Claudio R. Goncalves" , Joonsoo Kim , Glauber Costa , linux-mm@kvack.org, David Rientjes , elezegarcia@gmail.com On Fri, 25 Jan 2013, Simon Jeons wrote: > > > > node_match(NULL, xx) = 0 > > > > -> > > > > call into __slab_alloc. > > > > __slab_alloc() will check for !c->page which requires the assignment of a > > new per cpu slab page. > > > > But there are dereference in page_to_nid path, function page_to_section: > return (page->flags >> SECTIONS_PGSHIFT) & SECTIONS_MASK; node_match() checks for NULL and will not invoke page_to_nid for a NULL pointer. -- 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/ . Don't email: email@kvack.org