From: Prasanna S Panchamukhi <prasanna@in.ibm.com>
To: Andrew Morton <akpm@osdl.org>, Andi Kleen <ak@suse.de>
Cc: linux-kernel@vger.kernel.org, maneesh@in.ibm.com
Subject: [PATCH] kprobes: incorrect spin_unlock_irqrestore() call in register_kprobe()
Date: Wed, 16 Mar 2005 11:12:01 +0530 [thread overview]
Message-ID: <20050316054201.GD10456@in.ibm.com> (raw)
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 <prasanna@in.ibm.com>
---
---
linux-2.6.11-prasanna/kernel/kprobes.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff -puN kernel/kprobes.c~kprobes-incorrect-returnval kernel/kprobes.c
--- linux-2.6.11/kernel/kprobes.c~kprobes-incorrect-returnval 2005-03-16 11:03:42.000000000 +0530
+++ linux-2.6.11-prasanna/kernel/kprobes.c 2005-03-16 11:03:42.000000000 +0530
@@ -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
--
Prasanna S Panchamukhi
Linux Technology Center
India Software Labs, IBM Bangalore
Ph: 91-80-25044636
<prasanna@in.ibm.com>
reply other threads:[~2005-03-16 5:40 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20050316054201.GD10456@in.ibm.com \
--to=prasanna@in.ibm.com \
--cc=ak@suse.de \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maneesh@in.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox