From: tip-bot for Peter Zijlstra <peterz@infradead.org>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@redhat.com,
a.p.zijlstra@chello.nl, penberg@kernel.org, peterz@infradead.org,
nando@ccrma.Stanford.EDU, tglx@linutronix.de, mingo@elte.hu
Subject: [tip:core/urgent] slab, lockdep: Annotate the locks before using them
Date: Thu, 4 Aug 2011 08:36:11 GMT [thread overview]
Message-ID: <tip-30765b92ada267c5395fc788623cb15233276f5c@git.kernel.org> (raw)
In-Reply-To: <1311888176.2617.379.camel@laptop>
Commit-ID: 30765b92ada267c5395fc788623cb15233276f5c
Gitweb: http://git.kernel.org/tip/30765b92ada267c5395fc788623cb15233276f5c
Author: Peter Zijlstra <peterz@infradead.org>
AuthorDate: Thu, 28 Jul 2011 23:22:56 +0200
Committer: Ingo Molnar <mingo@elte.hu>
CommitDate: Thu, 4 Aug 2011 10:18:00 +0200
slab, lockdep: Annotate the locks before using them
Fernando found we hit the regular OFF_SLAB 'recursion' before we
annotate the locks, cure this.
The relevant portion of the stack-trace:
> [ 0.000000] [<c085e24f>] rt_spin_lock+0x50/0x56
> [ 0.000000] [<c04fb406>] __cache_free+0x43/0xc3
> [ 0.000000] [<c04fb23f>] kmem_cache_free+0x6c/0xdc
> [ 0.000000] [<c04fb2fe>] slab_destroy+0x4f/0x53
> [ 0.000000] [<c04fb396>] free_block+0x94/0xc1
> [ 0.000000] [<c04fc551>] do_tune_cpucache+0x10b/0x2bb
> [ 0.000000] [<c04fc8dc>] enable_cpucache+0x7b/0xa7
> [ 0.000000] [<c0bd9d3c>] kmem_cache_init_late+0x1f/0x61
> [ 0.000000] [<c0bba687>] start_kernel+0x24c/0x363
> [ 0.000000] [<c0bba0ba>] i386_start_kernel+0xa9/0xaf
Reported-by: Fernando Lopez-Lezcano <nando@ccrma.Stanford.EDU>
Acked-by: Pekka Enberg <penberg@kernel.org>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1311888176.2617.379.camel@laptop
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
mm/slab.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/mm/slab.c b/mm/slab.c
index 0703578..6d90a09 100644
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -1666,6 +1666,9 @@ void __init kmem_cache_init_late(void)
{
struct kmem_cache *cachep;
+ /* Annotate slab for lockdep -- annotate the malloc caches */
+ init_lock_keys();
+
/* 6) resize the head arrays to their final sizes */
mutex_lock(&cache_chain_mutex);
list_for_each_entry(cachep, &cache_chain, next)
@@ -1676,9 +1679,6 @@ void __init kmem_cache_init_late(void)
/* Done! */
g_cpucache_up = FULL;
- /* Annotate slab for lockdep -- annotate the malloc caches */
- init_lock_keys();
-
/*
* Register a cpu startup notifier callback that initializes
* cpu_cache_get for all new cpus
prev parent reply other threads:[~2011-08-04 8:36 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-27 21:37 [ANNOUNCE] 3.0-rt4 Thomas Gleixner
2011-07-27 21:57 ` Frank Rowand
2011-07-27 22:05 ` Thomas Gleixner
2011-07-27 22:27 ` Frank Rowand
2011-07-28 7:33 ` Nikita V. Youshchenko
2011-07-28 8:06 ` Thomas Gleixner
2011-07-28 8:24 ` Nikita V. Youshchenko
2011-07-28 8:44 ` Peter Zijlstra
2011-07-28 8:51 ` Nikita V. Youshchenko
2011-07-28 9:21 ` Anca Emanuel
2011-07-28 16:10 ` Thomas Gleixner
2011-07-28 9:37 ` Thomas Gleixner
2011-07-28 8:43 ` Peter Zijlstra
2011-07-28 9:41 ` Yong Zhang
2011-07-28 9:49 ` Thomas Gleixner
2011-07-28 11:22 ` N, Mugunthan V
2011-07-28 11:36 ` Thomas Gleixner
2011-07-28 15:59 ` hermann
2011-07-28 17:41 ` Paul E. McKenney
2011-07-28 17:43 ` Thomas Gleixner
2011-07-28 18:32 ` Paul E. McKenney
2011-07-28 19:05 ` Thomas Gleixner
2011-07-28 19:34 ` Paul E. McKenney
2011-07-28 20:29 ` Paul E. McKenney
2011-07-28 17:42 ` Jason Wessel
2011-07-28 17:49 ` Thomas Gleixner
2011-07-28 19:16 ` Fernando Lopez-Lezcano
2011-07-28 19:36 ` Thomas Gleixner
2011-07-29 0:13 ` Fernando Lopez-Lezcano
2011-07-28 21:22 ` Peter Zijlstra
2011-07-28 22:55 ` Pekka Enberg
2011-07-29 0:17 ` Fernando Lopez-Lezcano
2011-08-04 8:36 ` tip-bot for Peter Zijlstra [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=tip-30765b92ada267c5395fc788623cb15233276f5c@git.kernel.org \
--to=peterz@infradead.org \
--cc=a.p.zijlstra@chello.nl \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=mingo@redhat.com \
--cc=nando@ccrma.Stanford.EDU \
--cc=penberg@kernel.org \
--cc=tglx@linutronix.de \
/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