[openib-general] [RFC] [PATCH 2/7] ib_multicast 2.6.20: add ib_multicast module to track join requests from the same port
    Sean Hefty 
    sean.hefty at intel.com
       
    Thu Oct 12 11:21:03 PDT 2006
    
    
  
>But unlike the sa races which were unfixable without API changes,
>here users can synchronize the removal of the mc object.
>So I think what you describe is a user error.
The user can ensure that an id is only destroyed once.  What they cannot ensure
is whether their callback is still running.
>For example SDP does
>lock
>cm_id = ssk->cm_id
>ssk->cm_id = NULL
>unlock
>
>if (cm_id)
>destroy(cm_id)
If cm_id is NULL, there's no way to know if the callback is still running.
>and in callback
>
>ssk = context
>lock
>if (!ssk->cm_id) {
>	unlock
>	return 0;
>}
I'm assuming that the rest of the code looks something like:
ssk->cm_id = NULL;
unlock;
return 1;
- Sean
    
    
More information about the general
mailing list