kprobes: incorrect spin_unlock_irqrestore() call in register_kprobe()
PATCH 1/1 kprobes: incorrect spin_unlock_irqrestore() call in register_kprobe()
Hi,
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 <[email protected]>
---
---
linux-2.6.11-prasanna/kernel/kprobes.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-)
kernel/kprobes.c renamed from kernel/kprobes.c~kprobes-incorrect-returnval +3 -2
@@ -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;
_
Thanks
Prasanna
Signature · 5 lines
Prasanna S Panchamukhi Linux Technology Center India Software Labs, IBM Bangalore Ph: 91-80-25044636 <[email protected]>