Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759559AbXHQXkh (ORCPT ); Fri, 17 Aug 2007 19:40:37 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752439AbXHQXka (ORCPT ); Fri, 17 Aug 2007 19:40:30 -0400 Received: from www.osadl.org ([213.239.205.134]:49097 "EHLO mail.tglx.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750979AbXHQXk3 (ORCPT ); Fri, 17 Aug 2007 19:40:29 -0400 Subject: Re: kfree(0) - ok? From: Thomas Gleixner To: Pekka Enberg Cc: Christoph Lameter , Satyam Sharma , Andrew Morton , Arjan van de Ven , Tim Bird , linux kernel In-Reply-To: <84144f020708171442x52b18722k2971ceef96d3e72@mail.gmail.com> References: <46C233CB.9000602@am.sony.com> <1187132149.2618.2.camel@laptopd505.fenrus.org> <20070817112253.e6a7cb33.akpm@linux-foundation.org> <84144f020708171442x52b18722k2971ceef96d3e72@mail.gmail.com> Content-Type: text/plain Date: Sat, 18 Aug 2007 01:40:22 +0200 Message-Id: <1187394022.7007.133.camel@chaos> Mime-Version: 1.0 X-Mailer: Evolution 2.10.1 (2.10.1-4.fc7) Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 839 Lines: 24 On Sat, 2007-08-18 at 00:42 +0300, Pekka Enberg wrote: > On 8/18/07, Christoph Lameter wrote: > > That was merged over my objections. IMHO ksize(NULL) should fail since we > > are determining the size of an unallocated object. > > Agreed, especially as we have real zero-sized objects returned from > kmalloc() et al now. Do we really ? If yes, who invented this 1980s reminiscence, where you got valid pointers for malloc(0) ? This is completely stupid. You do not go into a bar and order an empty glass, just because you might eventually become thirsty later. tglx - 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/