[openib-general] cm_copy_private_data() : BUG or feature ?

Krishna Kumar2 krkumar2 at in.ibm.com
Mon Mar 20 22:57:07 PST 2006


Is cm_copy_private_data() intentionally returning NULL rather than, say 
something
like, ERR_PTR(-EINVAL) ? The problem is that in the caller, a NULL ptr 
translates to
success (0 > unsigned -1000), which might lead to errors in other code 
paths.

Though from a cursory examination, I couldn't find any specific oops cases 
as
private_data/len seem to be checked, but the problem is that this results 
in freeing
up earlier allocated private_data through cm_set_private_data(), while the 
id state is
ESTABLISHED. Hence looks like a bug to me.




More information about the general mailing list