Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S261526AbTIKWNr (ORCPT ); Thu, 11 Sep 2003 18:13:47 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S261573AbTIKWNr (ORCPT ); Thu, 11 Sep 2003 18:13:47 -0400 Received: from pc1-cwma1-5-cust4.swan.cable.ntl.com ([80.5.120.4]:55955 "EHLO dhcp23.swansea.linux.org.uk") by vger.kernel.org with ESMTP id S261526AbTIKWNp (ORCPT ); Thu, 11 Sep 2003 18:13:45 -0400 Subject: Re: [RFC][PATCH] kmalloc + memset(foo, 0, bar) = kmalloc0 From: Alan Cox To: "J.A. Magallon" Cc: Jamie Lokier , viro@parcelfarce.linux.theplanet.co.uk, Rolf Eike Beer , Linux Kernel Mailing List In-Reply-To: <20030911215805.GA7221@werewolf.able.es> References: <200309111540.58729@bilbo.math.uni-mannheim.de> <20030911134557.GV454@parcelfarce.linux.theplanet.co.uk> <20030911170944.GG29532@mail.jlokier.co.uk> <20030911215805.GA7221@werewolf.able.es> Content-Type: text/plain Content-Transfer-Encoding: 7bit Message-Id: <1063318342.3886.17.camel@dhcp23.swansea.linux.org.uk> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.4 (1.4.4-5) Date: Thu, 11 Sep 2003 23:12:23 +0100 Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 666 Lines: 19 On Iau, 2003-09-11 at 22:58, J.A. Magallon wrote: > On 09.11, Jamie Lokier wrote: > > viro@parcelfarce.linux.theplanet.co.uk wrote: > > > Bad choice of name - too easy to confuse with kmalloc(). > > > > kmalloc_and_zero() would be much clearer. > > > > Why not kcalloc() ? A kcalloc that also checked for maths overflows would probably help avoid various errors and checks against ~0/sizeof(n) in drivers we have now - 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/