[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <4922ED4D.8070201@redhat.com>
Date: Tue, 18 Nov 2008 11:29:01 -0500
From: Masami Hiramatsu <mhiramat@...hat.com>
To: akpm@...ux-foundation.org
CC: mm-commits@...r.kernel.org, ananth@...ibm.com,
anil.s.keshavamurthy@...el.com, Jim Keniston <jkenisto@...ibm.com>,
systemtap-ml <systemtap@...rces.redhat.com>,
LKML <linux-kernel@...r.kernel.org>
Subject: [PATCH -mm] bugfix: pass aggr_kprobe to arch_remove_kprobe
Hi Andrew,
akpm@...ux-foundation.org wrote:
> The patch titled
> kprobes: support probing module __exit function
> has been added to the -mm tree. Its filename is
> kprobes-support-probing-module-__exit-function.patch
I found that one bug was still alive. Here is the bugfix.
Thank you,
Call arch_remove_kprobe() with aggr_kprobe instead of user specific kprobe,
because the user specific kprobe on the gone or reused aggr_kprobe may have
invalid arch_specific_insn.
Signed-off-by: Masami Hiramatsu <mhiramat@...hat.com>
Cc: Ananth N Mavinakayanahalli <ananth@...ibm.com>
---
kernel/kprobes.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
Index: 2.6-rc/kernel/kprobes.c
===================================================================
--- 2.6-rc.orig/kernel/kprobes.c
+++ 2.6-rc/kernel/kprobes.c
@@ -766,14 +766,14 @@ static void __kprobes __unregister_kprob
{
struct kprobe *old_p;
- if (list_empty(&p->list) || list_is_singular(&p->list)) {
- if (!list_empty(&p->list)) {
- /* "p" is the last child of an aggr_kprobe */
- old_p = list_entry(p->list.next, struct kprobe, list);
- list_del(&p->list);
- kfree(old_p);
- }
+ if (list_empty(&p->list))
arch_remove_kprobe(p);
+ else if (list_is_singular(&p->list)) {
+ /* "p" is the last child of an aggr_kprobe */
+ old_p = list_entry(p->list.next, struct kprobe, list);
+ list_del(&p->list);
+ arch_remove_kprobe(old_p);
+ kfree(old_p);
}
}
--
Masami Hiramatsu
Software Engineer
Hitachi Computer Products (America) Inc.
Software Solutions Division
e-mail: mhiramat@...hat.com
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists