Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753193AbYAPRpd (ORCPT ); Wed, 16 Jan 2008 12:45:33 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751290AbYAPRp0 (ORCPT ); Wed, 16 Jan 2008 12:45:26 -0500 Received: from courier.cs.helsinki.fi ([128.214.9.1]:42664 "EHLO mail.cs.helsinki.fi" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750943AbYAPRpZ (ORCPT ); Wed, 16 Jan 2008 12:45:25 -0500 Date: Wed, 16 Jan 2008 19:45:22 +0200 (EET) From: Pekka J Enberg To: Christoph Lameter cc: Johannes Weiner , Linux Kernel Mailing List Subject: Re: Why is the kfree() argument const? In-Reply-To: Message-ID: References: <87lk6pvii0.fsf@saeurebad.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 900 Lines: 21 Hi, On Wed, 16 Jan 2008, Johannes Weiner wrote: > > is there any reason why kfree() takes a const pointer just to degrade it > > with the call to slab_free()/__cache_free() again? The promise that the > > pointee is not modified is just bogus in this case, anyway, isn't it? On Wed, 16 Jan 2008, Christoph Lameter wrote: > The object is modified in various cases f.e. because of poisoning or the > need to store the free pointer. So its bogus, yes. Pekka? Yeah, bogus, and has been that way for a long time according to git. I'm ok with removing that (which would make it consistent with the user-space equivalent free(3) function btw). Pekka -- 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/