diff options
Diffstat (limited to 'arch/ia64/kernel/kprobes.c')
-rw-r--r-- | arch/ia64/kernel/kprobes.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/arch/ia64/kernel/kprobes.c b/arch/ia64/kernel/kprobes.c index f07688da947c..f90be51b1123 100644 --- a/arch/ia64/kernel/kprobes.c +++ b/arch/ia64/kernel/kprobes.c | |||
@@ -434,7 +434,7 @@ int __kprobes trampoline_probe_handler(struct kprobe *p, struct pt_regs *regs) | |||
434 | /* | 434 | /* |
435 | * It is possible to have multiple instances associated with a given | 435 | * It is possible to have multiple instances associated with a given |
436 | * task either because an multiple functions in the call path | 436 | * task either because an multiple functions in the call path |
437 | * have a return probe installed on them, and/or more then one return | 437 | * have a return probe installed on them, and/or more than one return |
438 | * return probe was registered for a target function. | 438 | * return probe was registered for a target function. |
439 | * | 439 | * |
440 | * We can handle this because: | 440 | * We can handle this because: |
@@ -670,9 +670,11 @@ void __kprobes arch_disarm_kprobe(struct kprobe *p) | |||
670 | 670 | ||
671 | void __kprobes arch_remove_kprobe(struct kprobe *p) | 671 | void __kprobes arch_remove_kprobe(struct kprobe *p) |
672 | { | 672 | { |
673 | mutex_lock(&kprobe_mutex); | 673 | if (p->ainsn.insn) { |
674 | free_insn_slot(p->ainsn.insn, p->ainsn.inst_flag & INST_FLAG_BOOSTABLE); | 674 | free_insn_slot(p->ainsn.insn, |
675 | mutex_unlock(&kprobe_mutex); | 675 | p->ainsn.inst_flag & INST_FLAG_BOOSTABLE); |
676 | p->ainsn.insn = NULL; | ||
677 | } | ||
676 | } | 678 | } |
677 | /* | 679 | /* |
678 | * We are resuming execution after a single step fault, so the pt_regs | 680 | * We are resuming execution after a single step fault, so the pt_regs |