This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Patch 2/5][Djprobe]Djprobe Coexist with Kprobes


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]