[openib-general] [PATCH] for 2-6-19 rdma/addr: use client registration to fix module unload race

Or Gerlitz ogerlitz at voltaire.com
Tue Oct 31 03:16:31 PST 2006


Michael S. Tsirkin wrote:
> Quoting r. Or Gerlitz <ogerlitz at voltaire.com>:
>>>> Require registration with ib_addr module to prevent caller from unloading
>>>> while a callback is in progress.
>>> ib_cm has this bug as well. Shouldn't we patch it for 2.6.19 too?
>> I know there was a similar discussion which i was not tracking... re 
>> registrations with the ib_sa module, however, please tell me if and why 
>> i am wrong:
> 
> Look it up in the archives. Summary:
> 
> The race happens on module unload - you might be inside the cm callback when
> the module is unloaded. Nothing the module itself does can help here - you must
> synchronize with the cm before unloading.

I think to understand: you say that the CM can call the callback while 
the module unloads. However, my point is that the cm consumer module 
must destroy its cm id before unloading and that the cm id destroy code 
would block till all inflight callbacks on this id are done. Similarly 
to destroy_timer_sync or whatever it is called.

Am i still missing something?

Or.







More information about the general mailing list