[openib-general] [PATCH 3/3] iWARP CM
Sean Hefty
sean.hefty at intel.com
Sun Mar 12 21:24:24 PST 2006
>> > + 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
More information about the general
mailing list