[openib-general] Re: [PATCH 1 of 2] ipoib: pass all of multicast.c through ipoib_workqueue

Michael S. Tsirkin mst at mellanox.co.il
Tue Nov 29 12:14:10 PST 2005


Quoting Roland Dreier <rolandd at cisco.com>:
> Subject: Re: [PATCH 1 of 2] ipoib: pass all of multicast.c through ipoib_workqueue
> 
>     Michael> There appear to be several races in IPoIB multicast code:
>     Michael> for example when a MAD event may start the multicast
>     Michael> thread, while ipoib_stop tries to stop it, leaving a
>     Michael> thread running after the device is removed.
> 
> I need help understanding how moving the work queue helps with this.
> If one context queues work to stop the thread and then another context
> queues work to start it, can't we still end up with the thread running
> when the device is removed?
> 
>  - R.
> 

I think we can have:

context 1: check ADMIN_UP, it is set so we'll start thread
context 2: clear ADMIN_UP
context 2: stop thread
context 1: start thread

-- 
MST



More information about the general mailing list