[PATCH] kmemdup: some users
[safe/jmp/linux-2.6] / arch / i386 / kernel / kprobes.c
index 37f8623..afe6505 100644 (file)
@@ -28,7 +28,6 @@
  *             <prasanna@in.ibm.com> added function-return probes.
  */
 
-#include <linux/config.h>
 #include <linux/kprobes.h>
 #include <linux/ptrace.h>
 #include <linux/preempt.h>
@@ -257,9 +256,6 @@ static int __kprobes kprobe_handler(struct pt_regs *regs)
        int ret = 0;
        kprobe_opcode_t *addr;
        struct kprobe_ctlblk *kcb;
-#ifdef CONFIG_PREEMPT
-       unsigned pre_preempt_count = preempt_count();
-#endif /* CONFIG_PREEMPT */
 
        addr = (kprobe_opcode_t *)(regs->eip - sizeof(kprobe_opcode_t));
 
@@ -336,22 +332,16 @@ static int __kprobes kprobe_handler(struct pt_regs *regs)
                /* handler has already set things up, so skip ss setup */
                return 1;
 
-       if (p->ainsn.boostable == 1 &&
-#ifdef CONFIG_PREEMPT
-           !(pre_preempt_count) && /*
-                                      * This enables booster when the direct
-                                      * execution path aren't preempted.
-                                      */
-#endif /* CONFIG_PREEMPT */
-           !p->post_handler && !p->break_handler ) {
+ss_probe:
+#ifndef CONFIG_PREEMPT
+       if (p->ainsn.boostable == 1 && !p->post_handler){
                /* Boost up -- we can execute copied instructions directly */
                reset_current_kprobe();
                regs->eip = (unsigned long)p->ainsn.insn;
                preempt_enable_no_resched();
                return 1;
        }
-
-ss_probe:
+#endif
        prepare_singlestep(p, regs);
        kcb->kprobe_status = KPROBE_HIT_SS;
        return 1;