]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/powerpc/kernel/kprobes.c
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux...
[linux-2.6-omap-h63xx.git] / arch / powerpc / kernel / kprobes.c
index de79915452c87d917728acbeefbd70a2b738d242..c9329786073b2295d53cf7707abc21ded2f0a9a0 100644 (file)
@@ -96,9 +96,10 @@ void __kprobes arch_disarm_kprobe(struct kprobe *p)
 
 void __kprobes arch_remove_kprobe(struct kprobe *p)
 {
-       mutex_lock(&kprobe_mutex);
-       free_insn_slot(p->ainsn.insn, 0);
-       mutex_unlock(&kprobe_mutex);
+       if (p->ainsn.insn) {
+               free_insn_slot(p->ainsn.insn, 0);
+               p->ainsn.insn = NULL;
+       }
 }
 
 static void __kprobes prepare_singlestep(struct kprobe *p, struct pt_regs *regs)
@@ -316,7 +317,7 @@ static int __kprobes trampoline_probe_handler(struct kprobe *p,
        /*
         * It is possible to have multiple instances associated with a given
         * task either because an multiple functions in the call path
-        * have a return probe installed on them, and/or more then one return
+        * have a return probe installed on them, and/or more than one return
         * return probe was registered for a target function.
         *
         * We can handle this because: