From: Jesper Juhl <juhl-lkml@dif.dk>
To: Andrew Morton <akpm@osdl.org>
Cc: Jesper Juhl <juhl-lkml@dif.dk>,
linux-kernel@vger.kernel.org, mingo@redhat.com,
arjan@infradead.org, ecashin@noserose.net, greg@kroah.com,
axboe@suse.de
Subject: Re: [PATCH] make mempool_destroy resilient against NULL pointers.
Date: Sun, 24 Apr 2005 03:32:55 +0200 (CEST) [thread overview]
Message-ID: <Pine.LNX.4.62.0504240327470.2474@dragon.hyggekrogen.localhost> (raw)
In-Reply-To: <20050408184121.0a498a3d.akpm@osdl.org>
On Fri, 8 Apr 2005, Andrew Morton wrote:
> Jesper Juhl <juhl-lkml@dif.dk> wrote:
> >
> >
> > General rule (as I understand it) is that functions that free resources
> > should handle being passed NULL pointers - mempool_destroy() will
> > currently explode if passed a NULL pointer, the patch below makes it safe
> > to pass it NULL.
>
> The best response to mempool_destroy(0) is an oops. There's no legitimate
> reason for doing it.
>
Sorry to bring this up again but, take a look at the patch by
ecashin@coraid.com titled "[PATCH] aoe 5/12: don't try to free null
bufpool" http://grmso.net:8090/commit/03347936afcba990525736ae39daa13f643eac5f/diff/fa83c2ddd4293bd8bcaeeaf14bfdbf2fbe810420/
That's exactely the reason why the patch I submitted should be applied, to
avoid having to do such checks all over the place in other code and
instead just do it in one location. With this patch in place, the patch to
aoedev.c would not have been needed.
Or am I still misunderstanding something.
--
Jesper
prev parent reply other threads:[~2005-04-24 1:29 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-04-09 1:41 Jesper Juhl
2005-04-09 1:41 ` Andrew Morton
2005-04-09 1:46 ` Jesper Juhl
2005-04-24 1:32 ` Jesper Juhl [this message]
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.62.0504240327470.2474@dragon.hyggekrogen.localhost \
--to=juhl-lkml@dif.dk \
--cc=akpm@osdl.org \
--cc=arjan@infradead.org \
--cc=axboe@suse.de \
--cc=ecashin@noserose.net \
--cc=greg@kroah.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
/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: link
Be 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
all inboxes | Powered by JetHome®