[openib-general] memory leak?
Michael S. Tsirkin
mst at mellanox.co.il
Tue Sep 20 09:36:56 PDT 2005
----- Forwarded message from Leonid Keller -----
Look at the end of mthca_qp.c.
Why mthca_init_qp_table() performs
mthca_array_cleanup(&dev->qp_table.qp, dev->limits.num_qps);
on its error cleanup,
while mthca_cleanup_qp_table() - not ?
----- End forwarded message -----
Indeed. Roland, does the following make sense (untested, I'm
away from the lab now)? Or am I missing something?
---
Clean up qp table array on device exit.
Signed-off-by: Michael S. Tsirkin <mst at mellanox.co.il>
Index: linux-kernel/drivers/infiniband/hw/mthca/mthca_qp.c
===================================================================
--- linux-kernel.orig/drivers/infiniband/hw/mthca/mthca_qp.c 2005-09-20 19:31:44.000000000 +0300
+++ linux-kernel/drivers/infiniband/hw/mthca/mthca_qp.c 2005-09-20 19:32:00.000000000 +0300
@@ -2123,5 +2123,6 @@ void __devexit mthca_cleanup_qp_table(st
for (i = 0; i < 2; ++i)
mthca_CONF_SPECIAL_QP(dev, i, 0, &status);
+ mthca_array_cleanup(&dev->qp_table.qp, dev->limits.num_qps);
mthca_alloc_cleanup(&dev->qp_table.alloc);
}
--
MST
More information about the general
mailing list