aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ppc64/kernel/kprobes.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/ppc64/kernel/kprobes.c')
-rw-r--r--arch/ppc64/kernel/kprobes.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/arch/ppc64/kernel/kprobes.c b/arch/ppc64/kernel/kprobes.c
index ed876a5178ae..6071ee99f5cb 100644
--- a/arch/ppc64/kernel/kprobes.c
+++ b/arch/ppc64/kernel/kprobes.c
@@ -209,6 +209,11 @@ static inline int kprobe_handler(struct pt_regs *regs)
209 goto no_kprobe; 209 goto no_kprobe;
210 } 210 }
211 211
212 /*
213 * This preempt_disable() matches the preempt_enable_no_resched()
214 * in post_kprobe_handler().
215 */
216 preempt_disable();
212 kprobe_status = KPROBE_HIT_ACTIVE; 217 kprobe_status = KPROBE_HIT_ACTIVE;
213 current_kprobe = p; 218 current_kprobe = p;
214 kprobe_saved_msr = regs->msr; 219 kprobe_saved_msr = regs->msr;
@@ -219,11 +224,6 @@ static inline int kprobe_handler(struct pt_regs *regs)
219ss_probe: 224ss_probe:
220 prepare_singlestep(p, regs); 225 prepare_singlestep(p, regs);
221 kprobe_status = KPROBE_HIT_SS; 226 kprobe_status = KPROBE_HIT_SS;
222 /*
223 * This preempt_disable() matches the preempt_enable_no_resched()
224 * in post_kprobe_handler().
225 */
226 preempt_disable();
227 return 1; 227 return 1;
228 228
229no_kprobe: 229no_kprobe:
@@ -293,6 +293,7 @@ int __kprobes trampoline_probe_handler(struct kprobe *p, struct pt_regs *regs)
293 regs->nip = orig_ret_address; 293 regs->nip = orig_ret_address;
294 294
295 unlock_kprobes(); 295 unlock_kprobes();
296 preempt_enable_no_resched();
296 297
297 /* 298 /*
298 * By returning a non-zero value, we are telling 299 * By returning a non-zero value, we are telling