Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=43627582799db317e966ecb0002c2c3c9805ec0f
Commit:     43627582799db317e966ecb0002c2c3c9805ec0f
Parent:     0835ab53eab5bbeebe1c135e92fb0c4d483dde17
Author:     Srinivasa Ds <[EMAIL PROTECTED]>
AuthorDate: Sat Feb 23 15:24:04 2008 -0800
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Sat Feb 23 17:13:24 2008 -0800

    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 <[EMAIL PROTECTED]>
    Acked-by: Ananth N Mavinakayanahalli <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 kernel/sched.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/kernel/sched.c b/kernel/sched.c
index f28f19e..c4bc8c2 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -3766,7 +3766,7 @@ void scheduler_tick(void)
 
 #if defined(CONFIG_PREEMPT) && defined(CONFIG_DEBUG_PREEMPT)
 
-void add_preempt_count(int val)
+void __kprobes add_preempt_count(int val)
 {
        /*
         * Underflow?
@@ -3782,7 +3782,7 @@ void add_preempt_count(int val)
 }
 EXPORT_SYMBOL(add_preempt_count);
 
-void sub_preempt_count(int val)
+void __kprobes sub_preempt_count(int val)
 {
        /*
         * Underflow?
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to