[rds-devel] [PATCH] RDS/IB: Fix memory leak on the HCA driver unload.

Or Gerlitz ogerlitz at voltaire.com
Wed Dec 19 03:06:33 PST 2007


Vladimir Sokolovsky wrote:
> While removing HCA driver ib_dealloc_pd can be invoked before all existing
> connection (QPs) closed and then it will fail on reference counter.
> 
> Added list of connections per HCA device. All existing connections
> will be shutted down on device removal before deallocating the PD.

Looking on the code, rds does get per connection notification on device 
removal through the rdma-cm DEVICE_REMOVAL event and it calls 
rds_conn_drop(), etc.

So it seems to me that the source of the problem here is using two 
mechanisms for being notified on device removal, first through the 
rdma-cm and second through the ib_client_register API.

My thinking is that the correct way to follow here, is to remove from 
rds the code that uses the client register API and rely on the rdma-cm 
only.

comments?

Or.





More information about the rds-devel mailing list