[ofw] patch: Fix a race in the cl_timer code that caused deadlocks in opensm

Fab Tillier ftillier at microsoft.com
Wed Jun 23 12:05:07 PDT 2010


Hefty, Sean wrote on Wed, 23 Jun 2010 at 11:55:17

>> Forgot to mention, you should use the cb_serialize lock to protect
>> setting the thread ID too.
> 
> The thread ID needs to be protected using 'spinlock', since that lock
> is held when reading it later.  Or maybe cb_serialize would work, as
> long as thread_id is cleared after the callback returns...

Point was that if two callbacks are going to run, they should serialize before messing with the thread_id.

-Fab



More information about the ofw mailing list