kexec.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Eric DeVolder <eric.devolder@oracle.com>
To: kexec@lists.infradead.org, horms@verge.net.au, andrew.cooper3@citrix.com
Cc: daniel.kiper@oracle.com, eric.devolder@oracle.com,
	konrad.wilk@oracle.com
Subject: [PATCH v2 1/2] kexec-tools: Call dlclose() from within __xc_interface_close()
Date: Tue, 23 Jan 2018 13:12:50 -0600	[thread overview]
Message-ID: <1516734771-14795-2-git-send-email-eric.devolder@oracle.com> (raw)
In-Reply-To: <1516734771-14795-1-git-send-email-eric.devolder@oracle.com>

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 <eric.devolder@oracle.com>
---
v1: 23jan2018
 - Implemented feedback from Daniel Kiper

v2: 23jan2018
 - Implemented feedback from Daniel Kiper
 - Broke patch into two
---
 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;
 	}
 
-- 
2.7.4


_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

  reply	other threads:[~2018-01-23 19:13 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-23 19:12 [PATCH v2 0/2] kexec-tools: Tweak run-time handling of libxenctrl.so Eric DeVolder
2018-01-23 19:12 ` Eric DeVolder [this message]
2018-01-23 20:34   ` [PATCH v2 1/2] kexec-tools: Call dlclose() from within __xc_interface_close() Daniel Kiper
2018-01-24  8:35     ` Simon Horman
2018-01-23 19:12 ` [PATCH v2 2/2] kexec-tools: Make xc_dlhandle static Eric DeVolder
2018-01-23 20:59   ` Daniel Kiper
2018-01-24  8:36     ` Simon Horman
2018-01-24 18:08       ` Eric DeVolder
2018-01-24 18:07     ` Eric DeVolder

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1516734771-14795-2-git-send-email-eric.devolder@oracle.com \
    --to=eric.devolder@oracle.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=daniel.kiper@oracle.com \
    --cc=horms@verge.net.au \
    --cc=kexec@lists.infradead.org \
    --cc=konrad.wilk@oracle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).