From 31b463b833d0c70eca1f727bd6dfe269e2348e69 Mon Sep 17 00:00:00 2001 From: Honggang Li Date: Fri, 31 Jan 2020 15:09:10 +0800 Subject: [PATCH] workaround for librdmacm resource leak librdmacm was designed to open all verbs devices and keeps them open until the library unloads. In case librdmacm only unload when process exit, the resource allocated for opened verbs devices will free by OS. If dlclose called to unload librdmacm, those resource will be leak. Repeatedly load and unload librdmacm with dlopen and dlclose, will significantly magnify the resource leak issue. Signed-off-by: Honggang Li --- dat/udat/linux/dat_osd.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/dat/udat/linux/dat_osd.c b/dat/udat/linux/dat_osd.c index cbb95ba..f93726f 100644 --- a/dat/udat/linux/dat_osd.c +++ b/dat/udat/linux/dat_osd.c @@ -172,12 +172,5 @@ DAT_RETURN dat_os_library_unload ( const DAT_OS_LIBRARY_HANDLE library_handle) { - if ( 0 != dlclose (library_handle) ) - { - return DAT_INTERNAL_ERROR; - } - else - { - return DAT_SUCCESS; - } + return DAT_SUCCESS; } -- 2.24.1