[ofa-general] hotplug event handle question

Sean Hefty sean.hefty at intel.com
Wed Apr 25 23:20:13 PDT 2007


>> At the very least we need to repeat the check:
>>
>> 	if (!cma_comp(id_priv, CMA_DESTROYING))
>> 		return 0;
>>
>> here to avoid calling the user after they've tried to destroy their id from
>> another callback.  See comment above.
>
>OK. Would that be enough?

Off the top of my head, I don't think so.  Since the state is staying the same,
we now have the potential of another thread invoking a callback to the same id.
For example, the ib_cm could callback with a connect or reject event, which gets
propagated to the user.  The user will now see two callbacks for the same id.
Depending on the execution of the threads, one could completely run, with the
user wanting to destroy the associated id.  The second callback would then be
invoked after the id was destroyed.

The state combined with the dev_remove counter were used to serialize the
callbacks.  So we still need something to serialize the callbacks.

- Sean



More information about the general mailing list