Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752709AbYKSEcj (ORCPT ); Tue, 18 Nov 2008 23:32:39 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751538AbYKSEcb (ORCPT ); Tue, 18 Nov 2008 23:32:31 -0500 Received: from e38.co.us.ibm.com ([32.97.110.159]:35168 "EHLO e38.co.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751408AbYKSEc3 (ORCPT ); Tue, 18 Nov 2008 23:32:29 -0500 Date: Wed, 19 Nov 2008 10:01:21 +0530 From: Ananth N Mavinakayanahalli To: Masami Hiramatsu Cc: akpm@linux-foundation.org, mm-commits@vger.kernel.org, anil.s.keshavamurthy@intel.com, Jim Keniston , systemtap-ml , LKML Subject: Re: [PATCH -mm] bugfix: pass aggr_kprobe to arch_remove_kprobe Message-ID: <20081119043121.GB4053@in.ibm.com> Reply-To: ananth@in.ibm.com References: <200811140028.mAE0SppC021444@imap1.linux-foundation.org> <4922ED4D.8070201@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4922ED4D.8070201@redhat.com> User-Agent: Mutt/1.5.16 (2007-06-09) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2087 Lines: 67 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 > Cc: Ananth N Mavinakayanahalli Acked-by: Ananth N Mavinakayanahalli > --- > 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 > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/