diff options
Diffstat (limited to 'arch/powerpc/kernel/kprobes.c')
-rw-r--r-- | arch/powerpc/kernel/kprobes.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/arch/powerpc/kernel/kprobes.c b/arch/powerpc/kernel/kprobes.c index 5368f9c2e6bf..331e169e8629 100644 --- a/arch/powerpc/kernel/kprobes.c +++ b/arch/powerpc/kernel/kprobes.c | |||
@@ -60,13 +60,13 @@ int __kprobes arch_prepare_kprobe(struct kprobe *p) | |||
60 | if (!p->ainsn.insn) | 60 | if (!p->ainsn.insn) |
61 | ret = -ENOMEM; | 61 | ret = -ENOMEM; |
62 | } | 62 | } |
63 | return ret; | ||
64 | } | ||
65 | 63 | ||
66 | void __kprobes arch_copy_kprobe(struct kprobe *p) | 64 | if (!ret) { |
67 | { | 65 | memcpy(p->ainsn.insn, p->addr, MAX_INSN_SIZE * sizeof(kprobe_opcode_t)); |
68 | memcpy(p->ainsn.insn, p->addr, MAX_INSN_SIZE * sizeof(kprobe_opcode_t)); | 66 | p->opcode = *p->addr; |
69 | p->opcode = *p->addr; | 67 | } |
68 | |||
69 | return ret; | ||
70 | } | 70 | } |
71 | 71 | ||
72 | void __kprobes arch_arm_kprobe(struct kprobe *p) | 72 | void __kprobes arch_arm_kprobe(struct kprobe *p) |
@@ -85,9 +85,7 @@ void __kprobes arch_disarm_kprobe(struct kprobe *p) | |||
85 | 85 | ||
86 | void __kprobes arch_remove_kprobe(struct kprobe *p) | 86 | void __kprobes arch_remove_kprobe(struct kprobe *p) |
87 | { | 87 | { |
88 | down(&kprobe_mutex); | ||
89 | free_insn_slot(p->ainsn.insn); | 88 | free_insn_slot(p->ainsn.insn); |
90 | up(&kprobe_mutex); | ||
91 | } | 89 | } |
92 | 90 | ||
93 | static inline void prepare_singlestep(struct kprobe *p, struct pt_regs *regs) | 91 | static inline void prepare_singlestep(struct kprobe *p, struct pt_regs *regs) |