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

Michael S. Tsirkin mst at mellanox.co.il
Mon Aug 29 12:49:54 PDT 2005


Quoting r. Roland Dreier <rolandd at cisco.com>:
> Subject: Re: [PATCH] ipoib: device removal races
> 
>     Michael> OK, I wasnt exactly clear.  I was talking about
>     Michael> activating the sa queries: if starting and cancelling sa
>     Michael> queries could be done from under spinlock/interrupt
>     Michael> context, IPoIB could use straight spinlocks for
>     Michael> synchronisation, and avoid using workqueues altogether.
> 
> I'd have to audit the code to make sure, but as far as I know it
> should be fine to call the SA query API with spinlocks held.

Okay, but it also seems that, at least to cancel a query, its unsufficient
to call ib_sa_cancel_query - you then have to wait until you get a
callback, which seems to be performed from a work queue.

Can sa query be changed to perform the callback directly, and so
guarantee that query isnt used after ib_sa_cancel_query returns?

-- 
MST



More information about the general mailing list