aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteven Rostedt <rostedt@goodmis.org>2008-09-06 01:06:04 -0400
committerIngo Molnar <mingo@elte.hu>2008-10-14 04:36:58 -0400
commit644f991d4b920ab1f5043509651479420b293490 (patch)
tree075c57f5fd43206d54e5debed0e738e1878d73aa
parentc0719e5a4b1ccc04180b7a7b71095c9fb7131919 (diff)
ftrace: fix unlocking of hash
This must be brown paper bag week for Steven Rostedt! While working on ftrace for PPC, I discovered that the hash locking done when CONFIG_FTRACE_MCOUNT_RECORD is not set, is totally incorrect. With a cut and paste error, I had the hash lock macro to lock for both hash_lock _and_ hash_unlock! This bug did not affect x86 since this bug was introduced when CONFIG_FTRACE_MCOUNT_RECORD was added to x86. Signed-off-by: Steven Rostedt <srostedt@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
-rw-r--r--kernel/trace/ftrace.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c
index b69966f0f144..c9e09d86e1d8 100644
--- a/kernel/trace/ftrace.c
+++ b/kernel/trace/ftrace.c
@@ -170,7 +170,8 @@ static int __unregister_ftrace_function(struct ftrace_ops *ops)
170 */ 170 */
171static DEFINE_SPINLOCK(ftrace_hash_lock); 171static DEFINE_SPINLOCK(ftrace_hash_lock);
172#define ftrace_hash_lock(flags) spin_lock_irqsave(&ftrace_hash_lock, flags) 172#define ftrace_hash_lock(flags) spin_lock_irqsave(&ftrace_hash_lock, flags)
173#define ftrace_hash_unlock(flags) spin_lock_irqsave(&ftrace_hash_lock, flags) 173#define ftrace_hash_unlock(flags) \
174 spin_unlock_irqrestore(&ftrace_hash_lock, flags)
174#else 175#else
175/* This is protected via the ftrace_lock with MCOUNT_RECORD. */ 176/* This is protected via the ftrace_lock with MCOUNT_RECORD. */
176#define ftrace_hash_lock(flags) do { (void)(flags); } while (0) 177#define ftrace_hash_lock(flags) do { (void)(flags); } while (0)