diff options
Diffstat (limited to 'arch/i386/kernel/kprobes.c')
-rw-r--r-- | arch/i386/kernel/kprobes.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/arch/i386/kernel/kprobes.c b/arch/i386/kernel/kprobes.c index de2e16e561c0..afe6505ca0b3 100644 --- a/arch/i386/kernel/kprobes.c +++ b/arch/i386/kernel/kprobes.c | |||
@@ -256,11 +256,6 @@ static int __kprobes kprobe_handler(struct pt_regs *regs) | |||
256 | int ret = 0; | 256 | int ret = 0; |
257 | kprobe_opcode_t *addr; | 257 | kprobe_opcode_t *addr; |
258 | struct kprobe_ctlblk *kcb; | 258 | struct kprobe_ctlblk *kcb; |
259 | #ifdef CONFIG_PREEMPT | ||
260 | unsigned pre_preempt_count = preempt_count(); | ||
261 | #else | ||
262 | unsigned pre_preempt_count = 1; | ||
263 | #endif | ||
264 | 259 | ||
265 | addr = (kprobe_opcode_t *)(regs->eip - sizeof(kprobe_opcode_t)); | 260 | addr = (kprobe_opcode_t *)(regs->eip - sizeof(kprobe_opcode_t)); |
266 | 261 | ||
@@ -338,13 +333,15 @@ static int __kprobes kprobe_handler(struct pt_regs *regs) | |||
338 | return 1; | 333 | return 1; |
339 | 334 | ||
340 | ss_probe: | 335 | ss_probe: |
341 | if (pre_preempt_count && p->ainsn.boostable == 1 && !p->post_handler){ | 336 | #ifndef CONFIG_PREEMPT |
337 | if (p->ainsn.boostable == 1 && !p->post_handler){ | ||
342 | /* Boost up -- we can execute copied instructions directly */ | 338 | /* Boost up -- we can execute copied instructions directly */ |
343 | reset_current_kprobe(); | 339 | reset_current_kprobe(); |
344 | regs->eip = (unsigned long)p->ainsn.insn; | 340 | regs->eip = (unsigned long)p->ainsn.insn; |
345 | preempt_enable_no_resched(); | 341 | preempt_enable_no_resched(); |
346 | return 1; | 342 | return 1; |
347 | } | 343 | } |
344 | #endif | ||
348 | prepare_singlestep(p, regs); | 345 | prepare_singlestep(p, regs); |
349 | kcb->kprobe_status = KPROBE_HIT_SS; | 346 | kcb->kprobe_status = KPROBE_HIT_SS; |
350 | return 1; | 347 | return 1; |