* [PATCH -mm] bugfix: pass aggr_kprobe to arch_remove_kprobe [not found] <200811140028.mAE0SppC021444@imap1.linux-foundation.org> @ 2008-11-18 16:29 ` Masami Hiramatsu 2008-11-19 4:31 ` Ananth N Mavinakayanahalli 0 siblings, 1 reply; 2+ messages in thread From: Masami Hiramatsu @ 2008-11-18 16:29 UTC (permalink / raw) To: akpm Cc: mm-commits, ananth, anil.s.keshavamurthy, Jim Keniston, systemtap-ml, LKML Hi Andrew, akpm@linux-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@redhat.com> Cc: Ananth N Mavinakayanahalli <ananth@in.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@redhat.com ^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH -mm] bugfix: pass aggr_kprobe to arch_remove_kprobe 2008-11-18 16:29 ` [PATCH -mm] bugfix: pass aggr_kprobe to arch_remove_kprobe Masami Hiramatsu @ 2008-11-19 4:31 ` Ananth N Mavinakayanahalli 0 siblings, 0 replies; 2+ messages in thread From: Ananth N Mavinakayanahalli @ 2008-11-19 4:31 UTC (permalink / raw) To: Masami Hiramatsu Cc: akpm, mm-commits, anil.s.keshavamurthy, Jim Keniston, systemtap-ml, LKML On Tue, Nov 18, 2008 at 11:29:01AM -0500, Masami Hiramatsu wrote: > Hi Andrew, > > akpm@linux-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@redhat.com> > Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com> Acked-by: Ananth N Mavinakayanahalli <ananth@in.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@redhat.com > ^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-11-19 4:32 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <200811140028.mAE0SppC021444@imap1.linux-foundation.org>
2008-11-18 16:29 ` [PATCH -mm] bugfix: pass aggr_kprobe to arch_remove_kprobe Masami Hiramatsu
2008-11-19 4:31 ` Ananth N Mavinakayanahalli
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox