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

Michael S. Tsirkin mst at mellanox.co.il
Thu Apr 6 07:04:07 PDT 2006


Quoting r. Muli Ben-Yehuda <mulix at mulix.org>:
> Subject: Re: [openib-general] Re: RE: Re: [PATCH] ipoib_flush_paths
> 
> On Thu, Apr 06, 2006 at 04:38:33PM +0300, Michael S. Tsirkin wrote:
> 
> > No, since we are keeping a callback pointer into that module.
> 
> Sorry if I'm being dense but I don't see it in this patch. Point me at
> it?

You don't see it in the patch because SA already kept a callback pointer -
that's the race I'm solving. Look in sa_query.c


If I have

struct query {
	void (*callback)();
	struct module *owner;
}

Then it is always safe to do

	__get_module(query->owner);
	query->callback();
	put_module(query->owner);

since it is the called module's responsibility to invalidate
all such query objects before its unloaded.

-- 
MST



More information about the general mailing list