>> > + if (cm_id->device == NULL || cm_id->device->iwcm == NULL) >> > + return -EINVAL; >> >> Can these be removed? > >I am concerned about someone calling disconnect when the object has >already been disconnected or on an idle cm_id.
The problem is that there's no protection around this check. If a caller is calling disconnect twice or on an idle cm_id, then it sounds like the caller is broken. If another thread can change the device or iwcm pointer, then we're missing needed protection. This isn't a big deal, but it seems more likely to mask actual bugs. I would rather just see synchronized checks against some sort of state value, which I believe that this function has. - Sean _______________________________________________ openib-general mailing list [email protected] http://openib.org/mailman/listinfo/openib-general To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general
