[Openib-windows] Possible race in WSD code

Fabian Tillier ftillier at silverstorm.com
Tue May 16 11:31:55 PDT 2006


Hi Tzachi,

On 5/16/06, Tzachi Dar <tzachid at mellanox.co.il> wrote:
>
> Hi Fab,
>
> While doing some tests on WSD, I have came to a conclusion that there is a
> race in the function ibsp_conn_insert().
>
> If I'm right, than the problem is that the code looks at the root of
> conn_map without locking first. Since the root might change, until the lock
> is taken, I have received situations in which I was inserting at a time that
> the p_insert_at was no longer valid.

Good catch, fixed in revision 355.

> At the end of the function there is a similar situation that is probably not
> a bug. Still, to be on the safe side I have also inserted this under the
> lock.

I didn't apply this part of it - it's always save to compare with
cl_rbmap_end (as with cl_qmap_end and cl_qlist_end) - those functions
just return the address of the terminating item which is a member of
the rbmap structure.

- Fab



More information about the ofw mailing list