summaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorPrasanna S. Panchamukhi <prasanna@in.ibm.com>2005-03-28 03:58:10 -0800
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-03-28 03:58:10 -0800
commit068c82777b6b4f8827dc2820d41d312f2d58ae89 (patch)
tree89448aaf3f3e0e1bb3ab5b855cef446701be8026 /kernel
parentd85077eea77fc2d82b2b8943fdceada46e15a708 (diff)
[PATCH] kprobes: incorrect spin_unlock_irqrestore() call in register_kprobe()
register_kprobe() routine was calling spin_unlock_irqrestore() wrongly. This patch removes unwanted spin_unlock_irqrestore() call in register_kprobe() routine. Signed-off-by: Prasanna S Panchamukhi <prasanna@in.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/kprobes.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/kernel/kprobes.c b/kernel/kprobes.c
index 4a331aed0866..1d5dd1337bd1 100644
--- a/kernel/kprobes.c
+++ b/kernel/kprobes.c
@@ -79,7 +79,7 @@ int register_kprobe(struct kprobe *p)
unsigned long flags = 0;
if ((ret = arch_prepare_kprobe(p)) != 0) {
- goto out;
+ goto rm_kprobe;
}
spin_lock_irqsave(&kprobe_lock, flags);
INIT_HLIST_NODE(&p->hlist);
@@ -96,8 +96,9 @@ int register_kprobe(struct kprobe *p)
*p->addr = BREAKPOINT_INSTRUCTION;
flush_icache_range((unsigned long) p->addr,
(unsigned long) p->addr + sizeof(kprobe_opcode_t));
- out:
+out:
spin_unlock_irqrestore(&kprobe_lock, flags);
+rm_kprobe:
if (ret == -EEXIST)
arch_remove_kprobe(p);
return ret;