diff options
Diffstat (limited to 'arch/ppc64')
-rw-r--r-- | arch/ppc64/kernel/kprobes.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/ppc64/kernel/kprobes.c b/arch/ppc64/kernel/kprobes.c index 7e80d49c589a..9c6facc24f70 100644 --- a/arch/ppc64/kernel/kprobes.c +++ b/arch/ppc64/kernel/kprobes.c | |||
@@ -59,9 +59,9 @@ int __kprobes arch_prepare_kprobe(struct kprobe *p) | |||
59 | 59 | ||
60 | /* insn must be on a special executable page on ppc64 */ | 60 | /* insn must be on a special executable page on ppc64 */ |
61 | if (!ret) { | 61 | if (!ret) { |
62 | up(&kprobe_mutex); | ||
63 | p->ainsn.insn = get_insn_slot(); | ||
64 | down(&kprobe_mutex); | 62 | down(&kprobe_mutex); |
63 | p->ainsn.insn = get_insn_slot(); | ||
64 | up(&kprobe_mutex); | ||
65 | if (!p->ainsn.insn) | 65 | if (!p->ainsn.insn) |
66 | ret = -ENOMEM; | 66 | ret = -ENOMEM; |
67 | } | 67 | } |
@@ -90,9 +90,9 @@ void __kprobes arch_disarm_kprobe(struct kprobe *p) | |||
90 | 90 | ||
91 | void __kprobes arch_remove_kprobe(struct kprobe *p) | 91 | void __kprobes arch_remove_kprobe(struct kprobe *p) |
92 | { | 92 | { |
93 | up(&kprobe_mutex); | ||
94 | free_insn_slot(p->ainsn.insn); | ||
95 | down(&kprobe_mutex); | 93 | down(&kprobe_mutex); |
94 | free_insn_slot(p->ainsn.insn); | ||
95 | up(&kprobe_mutex); | ||
96 | } | 96 | } |
97 | 97 | ||
98 | static inline void prepare_singlestep(struct kprobe *p, struct pt_regs *regs) | 98 | static inline void prepare_singlestep(struct kprobe *p, struct pt_regs *regs) |