[Patch 2/5][Djprobe]Djprobe Coexist with Kprobes
Ananth N Mavinakayanahalli
amavin@redhat.com
Mon Oct 17 14:28:00 GMT 2005
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
More information about the Systemtap
mailing list