From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751580AbZG1FBp (ORCPT ); Tue, 28 Jul 2009 01:01:45 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1750835AbZG1FBo (ORCPT ); Tue, 28 Jul 2009 01:01:44 -0400 Received: from smtp-out.google.com ([216.239.45.13]:55183 "EHLO smtp-out.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750765AbZG1FBo (ORCPT ); Tue, 28 Jul 2009 01:01:44 -0400 DomainKey-Signature: a=rsa-sha1; s=beta; d=google.com; c=nofws; q=dns; h=date:from:x-x-sender:to:cc:subject:in-reply-to:message-id: references:user-agent:mime-version:content-type:x-system-of-record; b=an4lvhJpUMAL/5SQpdLCNGMmJewJ4HUXHJ31osV8AHCbSMtj+BWI5fpGyGoBf/0BX SaytfbluoPKVAq9K/j47w== Date: Mon, 27 Jul 2009 22:01:33 -0700 (PDT) From: David Rientjes X-X-Sender: rientjes@chino.kir.corp.google.com To: Benjamin Herrenschmidt cc: Linus Torvalds , Andrew Morton , Linux Kernel list , linux-mm Subject: Re: [PATCH] mm: Make it easier to catch NULL cache names In-Reply-To: <1248749739.30993.39.camel@pasglop> Message-ID: References: <1248745735.30993.38.camel@pasglop> <1248749739.30993.39.camel@pasglop> User-Agent: Alpine 2.00 (DEB 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-System-Of-Record: true Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 28 Jul 2009, Benjamin Herrenschmidt wrote: > > Please don't do BUG_ON() when there are alternatives. > > > > In this case, something like > > > > if (WARN_ON(!name)) > > return NULL; > > > > would probably have worked too. > > Fair enough.. I'll send a new patch. > Actually needs goto err, not return NULL, to appropriately panic when SLAB_PANIC is set.