[openib-general] Re: [PATCH] ipoib: device removal races

Michael S. Tsirkin mst at mellanox.co.il
Mon Aug 29 13:22:18 PDT 2005


Quoting r. Roland Dreier <rolandd at cisco.com>:
> Subject: Re: [PATCH] ipoib: device removal races
> 
>     Michael> Can sa query be changed to perform the callback directly,
>     Michael> and so guarantee that query isnt used after
>     Michael> ib_sa_cancel_query returns?
> 
> Hmm, that gets into the MAD layer design, but I think it gets very
> tricky.  For example, how do we know that the query isn't already
> completing on a different CPU as we enter the cancel call?

Something like:

Remove it from the idr before completing, under a spinlock.
Now if its in idr its not completing.

Could this work?

-- 
MST



More information about the general mailing list