[openib-general] [PATCH] rdma_bind_addr() leaks a cma_dev reference count

Sean Hefty mshefty at ichips.intel.com
Thu Oct 19 08:21:11 PDT 2006


Krishna Kumar2 wrote:
> This will mean that a deref is wrongly done if a loopback or zero address 
> is
> passed to this function, without it having done a ref inc. I do think this 
> case
> requires a variable to indicate whether a ref was got or not. Assuming 
> that is
> true, I will submit a patch with your comment about holding the lock.

Yes, you're right.  We would need to do:

if (!cma_any_addr(addr))

again before calling detach.

- Sean




More information about the general mailing list