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: SMP race [was: kprobe: kprobe-booster against 2.6.14-mm1 for i386]


On Tue, 2005-11-29 at 06:14, Masami Hiramatsu wrote:

> 
> By the way, I think the original kprobes has a smp racing
> problem.
> On SMP machine, a CPU (CPU0) can unregister that kprobe
> and release its instruction buffer, even if another CPU
> (CPU1) is executing kprobe_handler(). In this case, CPU1
> will execute released instructions.
> I found the kprobe just uses synchronize_sched() function.
> And I guess the kprobes uses this function to resolve the
> problem. If it is correct, how does this function resolve
> the problem?
> 
Yes, I think there's a race, although I expect that we would see a
problem only very rarely.  I've created bugzilla #1947 to track this
problem; it contains my analysis so far.

Thanks for pointing this out.

Jim


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