From: Andrew Morton <akpm@linux-foundation.org>
To: Tejun Heo <tj@kernel.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] mempool: drop unnecessary and incorrect BUG_ON() from mempool_destroy()
Date: Wed, 21 Dec 2011 16:25:19 -0800 [thread overview]
Message-ID: <20111221162519.b7fc3a79.akpm@linux-foundation.org> (raw)
In-Reply-To: <20111222001800.GL9213@google.com>
On Wed, 21 Dec 2011 16:18:00 -0800
Tejun Heo <tj@kernel.org> wrote:
> mempool_destroy() is a thin wrapper around free_pool(). The only
> thing it adds is BUG_ON(pool->curr_nr != pool->min_nr). The intention
> seems to be to enforce that all allocated elements are freed; however,
> the BUG_ON() can't achieve that (it doesn't know anything about
> objects above min_nr) and incorrect as mempool_resize() is allowed to
> leave the pool extended but not filled. Furthermore, panicking is way
> worse than any memory leak and there are better debug tools to track
> memory leaks.
>
> Drop the BUG_ON() from mempool_destory() and as that leaves the
> function identical to free_pool(), replace it.
>
> Signed-off-by: Tejun Heo <tj@kernel.org>
> Cc: Andrew Morton <akpm@linux-foundation.org>
> Cc: stable@kernel.org
(that's stable@vger.kernel.org)
> ---
> These patches are on top of "mempool: fix and document synchronization
> and memory barrier usage" patch[1]. Both are fixes and it probably is
> a good idea to forward to -stable.
I'm not sure that either of these are suitable for -stable. There's no
demonstrated problem, nor even a likely theoretical one, is there?
If we do decide to backport, I don't think the -stable guys will want
the large-but-nice comment-adding patch so both these patches would need to
be reworked for -stable usage. The first patch does apply successfully
to mainline. The second does not.
next prev parent reply other threads:[~2011-12-22 0:25 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-22 0:18 [PATCH 1/2] mempool: drop unnecessary and incorrect BUG_ON() from mempool_destroy() Tejun Heo
2011-12-22 0:19 ` [PATCH 2/2] mempool: fix first round failure behavior Tejun Heo
2011-12-22 0:32 ` Andrew Morton
2011-12-22 0:34 ` Tejun Heo
2011-12-22 0:46 ` [PATCH UPDATED " Tejun Heo
2011-12-22 1:09 ` Andrew Morton
2011-12-22 1:23 ` Tejun Heo
2011-12-22 1:31 ` Tejun Heo
2011-12-22 15:15 ` Vivek Goyal
2011-12-22 15:20 ` Vivek Goyal
2011-12-22 15:58 ` Tejun Heo
2011-12-22 16:04 ` Vivek Goyal
2011-12-22 16:15 ` Tejun Heo
2011-12-22 15:21 ` Tejun Heo
2011-12-22 0:25 ` Andrew Morton [this message]
2011-12-22 0:35 ` [PATCH 1/2] mempool: drop unnecessary and incorrect BUG_ON() from mempool_destroy() Tejun Heo
2011-12-22 0:40 ` Greg KH
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=20111221162519.b7fc3a79.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tj@kernel.org \
--cc=torvalds@linux-foundation.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: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.