[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <tip-635c17c2b2b4e5cd34f5dcba19d751b4e58533c2@git.kernel.org>
Date: Wed, 15 Sep 2010 10:05:39 GMT
From: tip-bot for Namhyung Kim <namhyung@...il.com>
To: linux-tip-commits@...r.kernel.org
Cc: linux-kernel@...r.kernel.org, hpa@...or.com, mingo@...hat.com,
masami.hiramatsu.pt@...achi.com, tglx@...utronix.de,
namhyung@...il.com, mingo@...e.hu
Subject: [tip:perf/core] kprobes: Add sparse context annotations
Commit-ID: 635c17c2b2b4e5cd34f5dcba19d751b4e58533c2
Gitweb: http://git.kernel.org/tip/635c17c2b2b4e5cd34f5dcba19d751b4e58533c2
Author: Namhyung Kim <namhyung@...il.com>
AuthorDate: Wed, 15 Sep 2010 10:04:30 +0900
Committer: Ingo Molnar <mingo@...e.hu>
CommitDate: Wed, 15 Sep 2010 10:44:02 +0200
kprobes: Add sparse context annotations
This removes following warnings when build with C=1
warning: context imbalance in 'kretprobe_hash_lock' - wrong count at exit
warning: context imbalance in 'kretprobe_table_lock' - wrong count at exit
warning: context imbalance in 'kretprobe_hash_unlock' - unexpected unlock
warning: context imbalance in 'kretprobe_table_unlock' - unexpected unlock
Signed-off-by: Namhyung Kim <namhyung@...il.com>
Acked-by: Masami Hiramatsu <masami.hiramatsu.pt@...achi.com>
LKML-Reference: <1284512670-2369-6-git-send-email-namhyung@...il.com>
Signed-off-by: Ingo Molnar <mingo@...e.hu>
---
kernel/kprobes.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/kernel/kprobes.c b/kernel/kprobes.c
index c53aad5..6dd5359 100644
--- a/kernel/kprobes.c
+++ b/kernel/kprobes.c
@@ -831,6 +831,7 @@ void __kprobes recycle_rp_inst(struct kretprobe_instance *ri,
void __kprobes kretprobe_hash_lock(struct task_struct *tsk,
struct hlist_head **head, unsigned long *flags)
+__acquires(hlist_lock)
{
unsigned long hash = hash_ptr(tsk, KPROBE_HASH_BITS);
spinlock_t *hlist_lock;
@@ -842,6 +843,7 @@ void __kprobes kretprobe_hash_lock(struct task_struct *tsk,
static void __kprobes kretprobe_table_lock(unsigned long hash,
unsigned long *flags)
+__acquires(hlist_lock)
{
spinlock_t *hlist_lock = kretprobe_table_lock_ptr(hash);
spin_lock_irqsave(hlist_lock, *flags);
@@ -849,6 +851,7 @@ static void __kprobes kretprobe_table_lock(unsigned long hash,
void __kprobes kretprobe_hash_unlock(struct task_struct *tsk,
unsigned long *flags)
+__releases(hlist_lock)
{
unsigned long hash = hash_ptr(tsk, KPROBE_HASH_BITS);
spinlock_t *hlist_lock;
@@ -859,6 +862,7 @@ void __kprobes kretprobe_hash_unlock(struct task_struct *tsk,
static void __kprobes kretprobe_table_unlock(unsigned long hash,
unsigned long *flags)
+__releases(hlist_lock)
{
spinlock_t *hlist_lock = kretprobe_table_lock_ptr(hash);
spin_unlock_irqrestore(hlist_lock, *flags);
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists