[openib-general] Re: [PATCH] fix race in mad.c

Michael S. Tsirkin mst at mellanox.co.il
Tue Jan 3 13:09:39 PST 2006


Quoting r. Sean Hefty <mshefty at ichips.intel.com>:
> Subject: Re: [openib-general] Re: [PATCH] fix race in mad.c
> 
> Michael S. Tsirkin wrote:
> >>There should be some way to fix this that doesn't involve walking a list on
> >>every completion.  Can't the cleanup be changed?  Either move destroying the QP
> >>after the workqueue flush or transition it to the error state before flushing.
> > 
> > What about resurrecting my idea to have ib_cq_sync()?
> > Then we could just set a flag to suppress queueing more work.
> 
> I don't remember the details of ib_cq_sync() off the top of my head.
> 
> I think that we need to add a state to struct ib_mad_port_private that can be 
> checked in ib_mad_thread_completion_handler().  I don't think that a new call is 
> needed though.
> 
> - Sean
> 

We also need a way to make sure that ib_mad_thread_completion_handler is
not currently running.

Thats what the proposed ib_cq_sync could do.

-- 
MST



More information about the general mailing list