diff options
authorEric DeVolder <>2018-01-23 13:12:50 -0600
committerSimon Horman <>2018-01-24 09:34:05 +0100
commit58c225a6d762c332c05343f8fd5f5acea4ea538b (patch)
parent894bea9335f57b62cbded7b02ab7d58308b647d8 (diff)
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". 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 <>
1 files changed, 1 insertions, 0 deletions
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;