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

Michael S. Tsirkin mst at mellanox.co.il
Wed Nov 1 03:31:37 PST 2006


Quoting r. Or Gerlitz <ogerlitz at voltaire.com>:
> what about enhancing xxx_destory_id() to sense that it was called from 
> this id callback context so the xxx module code defers the destory_id() 
>   execution to run after the callback is over. This can be done by 
> writing at the id the pid of the thread running the callback before 
> going to the consumer and deleting it when the callback returns. Then if 
> in_callback(id) holds, have the destory_id() call schedule itself to 
> later stage, where it checks again etc.

And then you still have the module unloading race.
We have the client registration all over the place now - ib_cm was the only
one left.

-- 
MST




More information about the general mailing list