[openib-general] Re: Re: [PATCH] ipoib_flush_paths

Michael S. Tsirkin mst at mellanox.co.il
Wed Apr 5 17:13:07 PDT 2006


Quoting r. Sean Hefty <mshefty at ichips.intel.com>:
> >By the way, I was thinking about SA queries, and I came to a conclusion
> >that we have an unfixable race at module unload: nothing I as the user of
> >SA do in my callback can ensure that my callback is not still running
> >when my module is unloaded.
> >
> >The problem here is lack of explicit registration wth SA: I just push 
> >queries
> >so there's no time SA can flush its queues for me.
> >
> >The only easy way out that I see is some kind of sa_flush function that
> >will flush MAD wqs, and ask all users to call that.
> >And I think we have the same bug in addr so this needs a flush function 
> >too.
> >
> >Makes sense?
> 
> Both ib_sa and ib_addr will always perform exactly one callback per 
> request.  A user only needs to wait for that callback to occur.

Sean, there's no safe way to do this in presence of loadable modules:

callback()
{
	set flag
	return;
}

flag is set but it is still not OK to unload module - you are executing
return from the module text section.

See now?

-- 
MST



More information about the general mailing list