diff options
author | Takashi Iwai <tiwai@suse.de> | 2010-06-23 16:07:34 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2010-06-23 16:07:34 +0200 |
commit | 1240e6b5532358257c52351639a8d2382fe58f84 (patch) | |
tree | 43d374ce976a41c6dcd12a70a51e0289093f8d07 /arch/powerpc/kernel/kprobes.c | |
parent | c9ff921abecda352e987a6aae169118a3fc9aa5d (diff) | |
parent | a5c7d797dcce3be5e77cd6ea62cc4920ededc32b (diff) | |
download | op-kernel-dev-1240e6b5532358257c52351639a8d2382fe58f84.zip op-kernel-dev-1240e6b5532358257c52351639a8d2382fe58f84.tar.gz |
Merge branch 'fix/misc' into topic/misc
Diffstat (limited to 'arch/powerpc/kernel/kprobes.c')
-rw-r--r-- | arch/powerpc/kernel/kprobes.c | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/arch/powerpc/kernel/kprobes.c b/arch/powerpc/kernel/kprobes.c index c533525..bc47352 100644 --- a/arch/powerpc/kernel/kprobes.c +++ b/arch/powerpc/kernel/kprobes.c @@ -378,17 +378,6 @@ static int __kprobes trampoline_probe_handler(struct kprobe *p, * single-stepped a copy of the instruction. The address of this * copy is p->ainsn.insn. */ -static void __kprobes resume_execution(struct kprobe *p, struct pt_regs *regs) -{ - int ret; - unsigned int insn = *p->ainsn.insn; - - regs->nip = (unsigned long)p->addr; - ret = emulate_step(regs, insn); - if (ret == 0) - regs->nip = (unsigned long)p->addr + 4; -} - static int __kprobes post_kprobe_handler(struct pt_regs *regs) { struct kprobe *cur = kprobe_running(); @@ -406,7 +395,8 @@ static int __kprobes post_kprobe_handler(struct pt_regs *regs) cur->post_handler(cur, regs, 0); } - resume_execution(cur, regs); + /* Adjust nip to after the single-stepped instruction */ + regs->nip = (unsigned long)cur->addr + 4; regs->msr |= kcb->kprobe_saved_msr; /*Restore back the original saved kprobes variables and continue. */ |