This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: [Patch 2/5][Djprobe]Djprobe Coexist with Kprobes
- From: Ananth N Mavinakayanahalli <amavin at redhat dot com>
- To: Masami Hiramatsu <hiramatu at sdl dot hitachi dot co dot jp>
- Cc: ananth at in dot ibm dot com, systemtap at sources dot redhat dot com, Satoshi Oshima <soshima at redhat dot com>, Hideo Aoki <haoki at redhat dot com>, sugita at sdl dot hitachi dot co dot jp
- Date: Mon, 17 Oct 2005 10:26:03 -0400
- Subject: Re: [Patch 2/5][Djprobe]Djprobe Coexist with Kprobes
- References: <433BE533.9080501@sdl.hitachi.co.jp> <20050929143149.GA3682@in.ibm.com> <4353AB77.7070509@sdl.hitachi.co.jp>
Masami Hiramatsu wrote:
Hi, Ananth
Ananth N Mavinakayanahalli wrote:
On Thu, Sep 29, 2005 at 09:59:31PM +0900, Masami Hiramatsu wrote:
[snip]
+
+ spin_lock(&djprobe_lock);
Please use _irqsave/_irqrestore versions at all places.
I have a question about using spin_lock_irqsave/restore.
Why it should be used at all places?
The djprobe_lock is not refered from probe handlers.
And register/unregister_djprobe() must not be called
from any interrupt handlers. So, I think it does not
cause deadlock even if we use simple spin_lock/unlock().
If the lock isn't referred from any handlers, we should be fine.
Remember though that for historical reasons, kprobe handlers run with
interrupts disabled only on i386. I think this is scheduled to change.
We have seen atleast one other bug due to not using the irqsave/restore
versions.
Ananth