summaryrefslogtreecommitdiffstats
path: root/arch/ppc64/kernel/kprobes.c
diff options
context:
space:
mode:
authorAnanth N Mavinakayanahalli <ananth@in.ibm.com>2005-10-01 13:14:17 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2005-10-01 10:54:47 -0700
commit2d8ab6ad6edf0e8709da9ad24e3f023503f76cee (patch)
treeba5f06ad6f77c199f9f7d79493013dbdebf2ba6c /arch/ppc64/kernel/kprobes.c
parent702c96d55059b4a8e5b1eb112ee3b1804708a1bd (diff)
downloadop-kernel-dev-2d8ab6ad6edf0e8709da9ad24e3f023503f76cee.zip
op-kernel-dev-2d8ab6ad6edf0e8709da9ad24e3f023503f76cee.tar.gz
[PATCH] ppc64: fix up()/down() usage for kprobe_mutex
The incorrect kprobe_mutex usage on x86_64 had percolated to ppc64 too. First noticed by Yanmin Zhang. Signed-off-by: Ananth N Mavinakayanahalli <ananth@in.ibm.com> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/ppc64/kernel/kprobes.c')
-rw-r--r--arch/ppc64/kernel/kprobes.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/ppc64/kernel/kprobes.c b/arch/ppc64/kernel/kprobes.c
index 7e80d49..9c6facc 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)
/* insn must be on a special executable page on ppc64 */
if (!ret) {
- up(&kprobe_mutex);
- p->ainsn.insn = get_insn_slot();
down(&kprobe_mutex);
+ p->ainsn.insn = get_insn_slot();
+ up(&kprobe_mutex);
if (!p->ainsn.insn)
ret = -ENOMEM;
}
@@ -90,9 +90,9 @@ void __kprobes arch_disarm_kprobe(struct kprobe *p)
void __kprobes arch_remove_kprobe(struct kprobe *p)
{
- up(&kprobe_mutex);
- free_insn_slot(p->ainsn.insn);
down(&kprobe_mutex);
+ free_insn_slot(p->ainsn.insn);
+ up(&kprobe_mutex);
}
static inline void prepare_singlestep(struct kprobe *p, struct pt_regs *regs)
OpenPOWER on IntegriCloud