From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2379 invoked by alias); 25 Nov 2005 06:14:37 -0000 Received: (qmail 2373 invoked by uid 22791); 25 Nov 2005 06:14:36 -0000 X-Spam-Status: No, hits=-0.5 required=5.0 tests=AWL,BAYES_20,DNS_FROM_RFC_POST X-Spam-Check-By: sourceware.org Received: from fmr19.intel.com (HELO orsfmr004.jf.intel.com) (134.134.136.18) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 25 Nov 2005 06:14:36 +0000 Received: from orsfmr101.jf.intel.com (orsfmr101.jf.intel.com [10.7.209.17]) by orsfmr004.jf.intel.com (8.12.10/8.12.10/d: major-outer.mc,v 1.1 2004/09/17 17:50:56 root Exp $) with ESMTP id jAP6EJvF026859; Fri, 25 Nov 2005 06:14:19 GMT Received: from pdsmsxvs01.pd.intel.com (pdsmsxvs01.pd.intel.com [172.16.12.122]) by orsfmr101.jf.intel.com (8.12.10/8.12.10/d: major-inner.mc,v 1.2 2004/09/17 18:05:01 root Exp $) with SMTP id jAP6EIdJ032691; Fri, 25 Nov 2005 06:14:19 GMT Received: from pdsmsx331.ccr.corp.intel.com ([172.16.12.58]) by pdsmsxvs01.pd.intel.com (SAVSMTP 3.1.7.47) with SMTP id M2005112514141725269 ; Fri, 25 Nov 2005 14:14:17 +0800 Received: from pdsmsx404.ccr.corp.intel.com ([172.16.12.64]) by pdsmsx331.ccr.corp.intel.com with Microsoft SMTPSVC(6.0.3790.211); Fri, 25 Nov 2005 14:14:17 +0800 X-MimeOLE: Produced By Microsoft Exchange V6.5.7226.0 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: quoted-printable Subject: RE: module function probe Date: Fri, 25 Nov 2005 06:14:00 -0000 Message-ID: <8126E4F969BA254AB43EA03C59F44E8403FF5A24@pdsmsx404> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: module function probe Thread-Index: AcXxhAzME8mUK7uDTx6Y4pVG5YLKLgAAtyGg From: "Zhang, Yanmin" To: "Mao, Bibo" , Cc: "Frank Ch. Eigler" , "Keshavamurthy, Anil S" X-OriginalArrivalTime: 25 Nov 2005 06:14:17.0680 (UTC) FILETIME=[77728500:01C5F187] X-Scanned-By: MIMEDefang 2.52 on 10.7.209.17 X-IsSubscribed: yes Mailing-List: contact systemtap-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Post: List-Help: , Sender: systemtap-owner@sourceware.org X-SW-Source: 2005-q4/txt/msg00272.txt.bz2 The module reference count is not correct. The module ref count should be i= ncreased with 1 when a kprobe is registered at the module exec text, and vi= ce versa. Yanmin >>-----Original Message----- >>From: Mao, Bibo >>Sent: 2005=C4=EA11=D4=C225=C8=D5 13:50 >>To: systemtap@sources.redhat.com >>Cc: 'Frank Ch. Eigler'; Keshavamurthy, Anil S; Zhang, Yanmin >>Subject: module function probe >> >>Hi, >> I wrote one module named probed.ko after compiled, and the other is kpro= be >>module named probing.ko which is to probe some function defined in probed= .ko >>module. >> And then I executed the follow command so that some function can be prob= ed. >> #insmod probed.ko >> #insmod probing.ko >>But when I undelete module in such order kernel will crash >> #rmmod probed.ko (system is ok) >> #rmmod probing.ko (system will crash) >>The reason is that when unregister kprobe it will restore original instru= ction, >>but when probed module exits, its instruction address space is freed, so = when >>restore original instruction it will crash. >> >>Regards >>Bibo,mao