From 58c225a6d762c332c05343f8fd5f5acea4ea538b Mon Sep 17 00:00:00 2001 From: Eric DeVolder Date: Tue, 23 Jan 2018 13:12:50 -0600 Subject: kexec-tools: Call dlclose() from within __xc_interface_close() This patch is a follow-on to commit 43d3932e "kexec-tools: Perform run-time linking of libxenctrl.so". This patch addresses feedback from Daniel Kiper. In the original patch, the call to dlclose() was omitted, in contrast to the description in the commit message. This patch inserts the call. Note that this dynamic linking feature is dependent upon the proper operation of the RTLD_NODELETE flag to dlopen(), which does work as advertised on Linux (otherwise the call to dlclose() should be omitted). Signed-off-by: Eric DeVolder Reviewed-by: Daniel Kiper Signed-off-by: Simon Horman --- kexec/kexec-xen.c | 1 + 1 file changed, 1 insertion(+) diff --git a/kexec/kexec-xen.c b/kexec/kexec-xen.c index d42a45a..75f8758 100644 --- a/kexec/kexec-xen.c +++ b/kexec/kexec-xen.c @@ -47,6 +47,7 @@ int __xc_interface_close(xc_interface *xch) func_t func = (func_t)dlsym(xc_dlhandle, "xc_interface_close"); rc = func(xch); + dlclose(xc_dlhandle); xc_dlhandle = NULL; } -- cgit