[openib-general] [PATCH] RDMA/cma: rdma_bind_addr() leaks a cma_dev reference count

Sean Hefty mshefty at ichips.intel.com
Wed Oct 18 09:48:55 PDT 2006


Krishna Kumar wrote:
>  	struct rdma_id_private *id_priv;
> +	int did_acquire_dev = 0;

See my other mail that gets rid of this flag.

> @@ -1776,6 +1778,8 @@ int rdma_bind_addr(struct rdma_cm_id *id
>  
>  	return 0;
>  err:
> +	if (did_acquire_dev)
> +		cma_detach_from_dev(id_priv);

We need to lock around cma_detach_from_dev().

- Sean




More information about the general mailing list