Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754878AbYAPQsS (ORCPT ); Wed, 16 Jan 2008 11:48:18 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751419AbYAPQsJ (ORCPT ); Wed, 16 Jan 2008 11:48:09 -0500 Received: from relay1.sgi.com ([192.48.171.29]:49136 "EHLO relay.sgi.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751243AbYAPQsI (ORCPT ); Wed, 16 Jan 2008 11:48:08 -0500 Date: Wed, 16 Jan 2008 08:48:07 -0800 (PST) From: Christoph Lameter X-X-Sender: clameter@schroedinger.engr.sgi.com To: Johannes Weiner cc: Linux Kernel Mailing List , penberg@cs.helsinki.fi Subject: Re: Why is the kfree() argument const? In-Reply-To: <87lk6pvii0.fsf@saeurebad.de> Message-ID: References: <87lk6pvii0.fsf@saeurebad.de> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 647 Lines: 15 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? 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? -- 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/