LKML Archive on lore.kernel.org help / color / mirror / Atom feed
From: Pekka J Enberg <penberg@cs.helsinki.fi> To: Andrew Morton <akpm@linux-foundation.org> Cc: ast@domdv.de, clameter@sgi.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH] slab: deal with NULL pointers passed to kmem_cache_free Date: Mon, 19 Mar 2007 13:40:37 +0200 (EET) [thread overview] Message-ID: <Pine.LNX.4.64.0703191334280.14446@sbz-30.cs.Helsinki.FI> (raw) In-Reply-To: <20070319033108.b51bed63.akpm@linux-foundation.org> Hi, On Mon, 19 Mar 2007, Andrew Morton wrote: > err, we don't want to do this, do we? It adds overhead for something which > we've carefully taught all our programmers to not do. The only known code > which will benefit from this is buggy. Well, I actually disagree with that. It makes little sense for kmem_cache_free() to behave differently from kfree() especially since the overhead is minimal. But anyway, if you're unhappy with the patch, then we should make it explicit that you're not allowed to pass NULL to kmem_cache_free(), mempool_free() and perhaps others as well in which case kfree() comes even more special... I know this has been discussed in the past but I think you should be able to blindly pass whetever pointer the allocator fuction gives you to the corresponding release function which is why I wanted to fix kmem_cache_free() in the first place. On Mon, 19 Mar 2007, Andrew Morton wrote: > s/fix/hide/ No, even though there is clearly some problem with either the scsi or block layer not allocating any pages for the iovec, I do think slab should deal with NULL pointers properly. Pekka
next prev parent reply other threads:[~2007-03-19 11:40 UTC|newest] Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top 2007-03-19 8:27 [PATCH] slab: deal with NULL pointers passed to kmem_cache_free Pekka J Enberg 2007-03-19 11:31 ` Andrew Morton 2007-03-19 11:40 ` Pekka J Enberg [this message] 2007-03-19 17:08 ` Christoph Lameter 2007-03-19 17:31 ` Pekka J Enberg 2007-03-19 20:49 ` Matt Mackall 2007-03-19 21:10 ` Andrew Morton 2007-03-19 21:25 ` Pekka Enberg 2007-03-19 21:41 ` Andrew Morton 2007-03-19 21:49 ` Matt Mackall 2007-03-20 7:06 ` Pekka Enberg 2007-03-20 18:41 ` Christoph Lameter 2007-03-21 11:42 ` Pekka J Enberg 2007-03-20 7:14 ` Pekka Enberg 2007-03-20 7:39 ` Eric Dumazet 2007-03-20 7:47 ` Pekka J Enberg 2007-03-20 7:56 ` Eric Dumazet 2007-03-21 10:11 ` Jarek Poplawski 2007-03-21 12:13 ` Pekka Enberg 2007-03-21 13:31 ` Jarek Poplawski 2007-03-21 13:36 ` Pekka J Enberg 2007-03-21 14:11 ` Rafael J. Wysocki 2007-03-21 14:41 ` Pekka Enberg 2007-03-21 16:30 ` Andrew Morton 2007-03-21 17:54 ` Jörn Engel 2007-03-21 18:32 ` Pekka Enberg 2007-03-21 14:45 ` Jarek Poplawski 2007-03-19 22:04 ` Jörn Engel 2007-03-19 21:16 ` Christoph Lameter 2007-03-19 21:44 ` Matt Mackall 2007-03-19 23:32 ` Andreas Steinmetz
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=Pine.LNX.4.64.0703191334280.14446@sbz-30.cs.Helsinki.FI \ --to=penberg@cs.helsinki.fi \ --cc=akpm@linux-foundation.org \ --cc=ast@domdv.de \ --cc=clameter@sgi.com \ --cc=linux-kernel@vger.kernel.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).