From: Rene Herman <rene.herman@keyaccess.nl>
To: Roel Kluin <12o3l@tiscali.nl>
Cc: Pekka Enberg <penberg@cs.helsinki.fi>,
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 14:49:52 +0200 [thread overview]
Message-ID: <471C9C70.8000206@keyaccess.nl> (raw)
In-Reply-To: <84144f020710220540i7be08eednf40db8367669825f@mail.gmail.com>
On 10/22/2007 02:40 PM, Pekka Enberg wrote:
> 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.
(which by the way also means that the "return;" delete from your original
patch changes behaviour for !CONFIG_BUG, and probably not for the better).
Rene.
next prev parent reply other threads:[~2007-10-22 12:52 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-22 2:10 [PATCH] unlock before bug returns 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
2007-10-22 12:49 ` Rene Herman [this message]
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=471C9C70.8000206@keyaccess.nl \
--to=rene.herman@keyaccess.nl \
--cc=12o3l@tiscali.nl \
--cc=clameter@sgi.com \
--cc=linux-kernel@vger.kernel.org \
--cc=penberg@cs.helsinki.fi \
--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 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.