This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
[PATCH -tip v9 18/26] sched: Use NOKPROBE_SYMBOL macro in sched
- From: Masami Hiramatsu <masami dot hiramatsu dot pt at hitachi dot com>
- To: linux-kernel at vger dot kernel dot org, Ingo Molnar <mingo at kernel dot org>
- Cc: Andi Kleen <andi at firstfloor dot org>, Ananth N Mavinakayanahalli <ananth at in dot ibm dot com>, Peter Zijlstra <peterz at infradead dot org>, Frederic Weisbecker <fweisbec at gmail dot com>, x86 at kernel dot org, Steven Rostedt <rostedt at goodmis dot org>, Sandeepa Prabhu <sandeepa dot prabhu at linaro dot org>, fche at redhat dot com, mingo at redhat dot com, systemtap at sourceware dot org, "H. Peter Anvin" <hpa at zytor dot com>, Thomas Gleixner <tglx at linutronix dot de>
- Date: Thu, 17 Apr 2014 17:18:42 +0900
- Subject: [PATCH -tip v9 18/26] sched: Use NOKPROBE_SYMBOL macro in sched
- Authentication-results: sourceware.org; auth=none
- References: <20140417081636 dot 26341 dot 87858 dot stgit at ltc230 dot yrl dot intra dot hitachi dot co dot jp>
Use NOKPROBE_SYMBOL macro to protect functions from
kprobes instead of __kprobes annotation in sched/core.c.
Signed-off-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Reviewed-by: Steven Rostedt <rostedt@goodmis.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
---
kernel/sched/core.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index ce9b306..86e5778 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -2477,7 +2477,7 @@ notrace unsigned long get_parent_ip(unsigned long addr)
#if defined(CONFIG_PREEMPT) && (defined(CONFIG_DEBUG_PREEMPT) || \
defined(CONFIG_PREEMPT_TRACER))
-void __kprobes preempt_count_add(int val)
+void preempt_count_add(int val)
{
#ifdef CONFIG_DEBUG_PREEMPT
/*
@@ -2503,8 +2503,9 @@ void __kprobes preempt_count_add(int val)
}
}
EXPORT_SYMBOL(preempt_count_add);
+NOKPROBE_SYMBOL(preempt_count_add);
-void __kprobes preempt_count_sub(int val)
+void preempt_count_sub(int val)
{
#ifdef CONFIG_DEBUG_PREEMPT
/*
@@ -2525,6 +2526,7 @@ void __kprobes preempt_count_sub(int val)
__preempt_count_sub(val);
}
EXPORT_SYMBOL(preempt_count_sub);
+NOKPROBE_SYMBOL(preempt_count_sub);
#endif