aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/sched.c
diff options
context:
space:
mode:
authorSrinivasa Ds <srinivasa@in.ibm.com>2008-02-23 18:24:04 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2008-02-23 20:13:24 -0500
commit43627582799db317e966ecb0002c2c3c9805ec0f (patch)
treefcfd50780b438d0ec04830faa857de9b86665e76 /kernel/sched.c
parent0835ab53eab5bbeebe1c135e92fb0c4d483dde17 (diff)
kprobes: refuse kprobe insertion on add/sub_preempt_counter()
Kprobes makes use of preempt_disable(),preempt_enable_noresched() and these functions inturn call add/sub_preempt_count(). So we need to refuse user from inserting probe in to these functions. This patch disallows user from probing add/sub_preempt_count(). Signed-off-by: Srinivasa DS <srinivasa@in.ibm.com> Acked-by: Ananth N Mavinakayanahalli <ananth@in.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel/sched.c')
-rw-r--r--kernel/sched.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/sched.c b/kernel/sched.c
index f28f19e65b59..c4bc8c210958 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -3766,7 +3766,7 @@ void scheduler_tick(void)
3766 3766
3767#if defined(CONFIG_PREEMPT) && defined(CONFIG_DEBUG_PREEMPT) 3767#if defined(CONFIG_PREEMPT) && defined(CONFIG_DEBUG_PREEMPT)
3768 3768
3769void add_preempt_count(int val) 3769void __kprobes add_preempt_count(int val)
3770{ 3770{
3771 /* 3771 /*
3772 * Underflow? 3772 * Underflow?
@@ -3782,7 +3782,7 @@ void add_preempt_count(int val)
3782} 3782}
3783EXPORT_SYMBOL(add_preempt_count); 3783EXPORT_SYMBOL(add_preempt_count);
3784 3784
3785void sub_preempt_count(int val) 3785void __kprobes sub_preempt_count(int val)
3786{ 3786{
3787 /* 3787 /*
3788 * Underflow? 3788 * Underflow?