From: "Pekka Enberg" <penberg@cs.helsinki.fi>
To: "Roel Kluin" <12o3l@tiscali.nl>
Cc: "Rik van Riel" <riel@redhat.com>,
lkml <linux-kernel@vger.kernel.org>,
"Christoph Lameter" <clameter@sgi.com>
Subject: Re: [PATCH] unlock before bug returns
Date: Mon, 22 Oct 2007 15:40:44 +0300 [thread overview]
Message-ID: <84144f020710220540i7be08eednf40db8367669825f@mail.gmail.com> (raw)
In-Reply-To: <471C930D.4000004@tiscali.nl>
Hi Roel,
On 10/22/07, Roel Kluin <12o3l@tiscali.nl> wrote:
> diff --git a/mm/slab.c b/mm/slab.c
> index cfa6be4..20c58dc 100644
> --- a/mm/slab.c
> +++ b/mm/slab.c
> @@ -1606,8 +1606,10 @@ void __init kmem_cache_init(void)
> struct kmem_cache *cachep;
> mutex_lock(&cache_chain_mutex);
> list_for_each_entry(cachep, &cache_chain, next)
> - if (enable_cpucache(cachep))
> + if (enable_cpucache(cachep)) {
> + mutex_unlock(&cache_chain_mutex);
> BUG();
> + }
> mutex_unlock(&cache_chain_mutex);
> }
NAK. This will cause double-unlock when CONFIG_BUG is disabled. It's
incorrect to assume that BUG() will always terminate the current
process.
next prev parent reply other threads:[~2007-10-22 12:40 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-22 2:10 Roel Kluin
2007-10-22 2:58 ` Roel Kluin
2007-10-22 4:10 ` Rik van Riel
2007-10-22 12:09 ` Roel Kluin
2007-10-22 12:40 ` Pekka Enberg [this message]
2007-10-22 12:49 ` Rene Herman
2007-10-22 19:17 ` Roel Kluin
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=84144f020710220540i7be08eednf40db8367669825f@mail.gmail.com \
--to=penberg@cs.helsinki.fi \
--cc=12o3l@tiscali.nl \
--cc=clameter@sgi.com \
--cc=linux-kernel@vger.kernel.org \
--cc=riel@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®