[ofw] [PATCH v2] libibverbs/device: destroy completion channel when closing device
Sean Hefty
sean.hefty at intel.com
Thu Jan 28 16:51:23 PST 2010
ibv_close_device should destroy the completion channel
when closing the device and freeing the memory.
Changes from v1:
moved the call to CompChannelCleanup above ibv_release. ibv_release
has the potential to free the completion manager referenced by the
channel.
Signed-off-by: Sean Hefty <sean.hefty at intel.com>
---
This patch should replace the v1 patch with the same subject in 2.2.
trunk/ulp/libibverbs/src/device.cpp | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/trunk/ulp/libibverbs/src/device.cpp b/trunk/ulp/libibverbs/src/device.cpp
index a515a16..1b66d3c 100644
--- a/trunk/ulp/libibverbs/src/device.cpp
+++ b/trunk/ulp/libibverbs/src/device.cpp
@@ -279,6 +279,7 @@ int ibv_close_device(struct ibv_context *context)
}
context->cmd_if->Release();
+ CompChannelCleanup(&vcontext->context.channel);
ibv_release();
delete vcontext->port;
delete vcontext;
More information about the ofw
mailing list