[openib-general] Re: sdp_link.c info_list locking question

Libor Michalek libor at topspin.com
Thu May 19 09:12:02 PDT 2005


On Thu, May 19, 2005 at 11:12:38AM +0300, Michael S. Tsirkin wrote:
> Libor, I'm looking at sdp_link.c, and I dont see any lock
> protecting the info_list linked list.
> What prevents sdp_path_info_lookup from being called while
> sdp_path_info_create or sdp_path_info_destroy is in progress?

Michael, you are correct that the locking is missing, there's
actually a line about it in the TODO file. When I moved the
sdp code to gen2 it was easier to rewrite sdp_link because of
all the other junk that was in the old version, but to get
something done quickly I left out locking. I figured eventually
the IP to PathRecord service would be broken into a seperate
module, like the old ip2pr, since there is the possibility for
multiple consumers.  However, that has yet to happen, so if
someone wants to add the locking, feel free.


-Libor



More information about the general mailing list