[openib-general] [PATCH] memory leaks in ipoib, srp
Michael S. Tsirkin
mst at mellanox.co.il
Thu Sep 1 00:13:01 PDT 2005
I noticed the following while working on the client data patch.
BTW, opinions on the newer version I sent?
---
Fix IPoIB and SRP memory leak on device removal.
Signed-off-by: Michael S. Tsirkin <mst at mellanox.co.il>
Index: linux-2.6.12.2/drivers/infiniband/ulp/srp/ib_srp.c
===================================================================
--- linux-2.6.12.2.orig/drivers/infiniband/ulp/srp/ib_srp.c 2005-09-01 12:01:29.000000000 +0300
+++ linux-2.6.12.2/drivers/infiniband/ulp/srp/ib_srp.c 2005-09-01 12:04:54.000000000 +0300
@@ -1416,6 +1416,8 @@ static void srp_remove_one(struct ib_dev
ib_dealloc_pd(host->pd);
kfree(host);
}
+
+ kfree(dev_list);
}
static int __init srp_init_module(void)
Index: linux-2.6.12.2/drivers/infiniband/ulp/ipoib/ipoib_main.c
===================================================================
--- linux-2.6.12.2.orig/drivers/infiniband/ulp/ipoib/ipoib_main.c 2005-09-01 12:01:29.000000000 +0300
+++ linux-2.6.12.2/drivers/infiniband/ulp/ipoib/ipoib_main.c 2005-09-01 12:04:31.000000000 +0300
@@ -1065,6 +1065,8 @@ static void ipoib_remove_one(struct ib_d
ipoib_dev_cleanup(priv->dev);
free_netdev(priv->dev);
}
+
+ kfree(dev_list);
}
static int __init ipoib_init_module(void)
--
MST
More information about the general
mailing list