public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: bibo mao <bibo_mao@linux.intel.com>
To: Zhou Yingchao <yingchao.zhou@gmail.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Fwd: [PATCH] kretprobe instance recycled by parent process
Date: Wed, 15 Feb 2006 14:21:40 +0800	[thread overview]
Message-ID: <43F2C874.10400@linux.intel.com> (raw)
In-Reply-To: <67029b170602142159i7a2bf1b2w@mail.gmail.com>

Zhou Yingchao wrote:
>>>> When kretprobe probe schedule() function, if probed process exit then
>>>> schedule() function will never return, so some kretprobe instance will
>>>> never be recycled. By this patch the parent process will recycle
>>>> retprobe instance of probed function, there will be no memory leak of
>>>> kretprobe instance. This patch is based on 2.6.16-rc3.
>>> Is there any process which can exit without go through the do_exit() path?
>>> --
>> When process exits through do_exit() function, it will call schedule()
>> function. But if schedule() function is probed by kretprobe, this time
>> schedule() function will not return never because process has exited.
>>
>> bibo,mao
>>
> 
> In the original path, doesn't the call path of
> do_exit()->exit_thread()->kprobe_flush_task(current) recycle the
> kretprobe instance? Is there anything misundstood?
> --
yes, it is right. The old recycle method is
    do_exit()->exit_thread()->kprobe_flush_task(current)
             ->schedule()
At last line of do_exit() it will call schedule() function, and this 
time it will never return. But if schedule function is probed, who is 
responsible for recycling it?

bibo,mao

      reply	other threads:[~2006-02-15  6:22 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-15 10:42 [PATCH] kretprobe instance recycled by parent process bibo mao
     [not found] ` <67029b170602141936v69b85832q@mail.gmail.com>
2006-02-15  3:39   ` Fwd: " Zhou Yingchao
2006-02-15 12:55     ` bibo mao
2006-02-15  5:59       ` Zhou Yingchao
2006-02-15  6:21         ` bibo mao [this message]

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=43F2C874.10400@linux.intel.com \
    --to=bibo_mao@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=yingchao.zhou@gmail.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