All of lore.kernel.org
 help / color / mirror / Atom feed
From: <gregkh@linuxfoundation.org>
To: vkuznets@redhat.com, gregkh@linuxfoundation.org,
	kys@microsoft.com, sumit.semwal@linaro.org
Cc: <stable@vger.kernel.org>, <stable-commits@vger.kernel.org>
Subject: Patch "Tools: hv: kvp: ensure kvp device fd is closed on exec" has been added to the 4.4-stable tree
Date: Tue, 25 Apr 2017 13:20:51 +0100	[thread overview]
Message-ID: <1493122851149206@kroah.com> (raw)


This is a note to let you know that I've just added the patch titled

    Tools: hv: kvp: ensure kvp device fd is closed on exec

to the 4.4-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     tools-hv-kvp-ensure-kvp-device-fd-is-closed-on-exec.patch
and it can be found in the queue-4.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.


>From 26840437cbd6d3625ea6ab34e17cd34bb810c861 Mon Sep 17 00:00:00 2001
From: Vitaly Kuznetsov <vkuznets@redhat.com>
Date: Wed, 6 Jul 2016 18:24:10 -0700
Subject: Tools: hv: kvp: ensure kvp device fd is closed on exec

From: Vitaly Kuznetsov <vkuznets@redhat.com>

commit 26840437cbd6d3625ea6ab34e17cd34bb810c861 upstream.

KVP daemon does fork()/exec() (with popen()) so we need to close our fds
to avoid sharing them with child processes. The immediate implication of
not doing so I see is SELinux complaining about 'ip' trying to access
'/dev/vmbus/hv_kvp'.

Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Sumit Semwal <sumit.semwal@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 tools/hv/hv_kvp_daemon.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/tools/hv/hv_kvp_daemon.c
+++ b/tools/hv/hv_kvp_daemon.c
@@ -1433,7 +1433,7 @@ int main(int argc, char *argv[])
 	openlog("KVP", 0, LOG_USER);
 	syslog(LOG_INFO, "KVP starting; pid is:%d", getpid());
 
-	kvp_fd = open("/dev/vmbus/hv_kvp", O_RDWR);
+	kvp_fd = open("/dev/vmbus/hv_kvp", O_RDWR | O_CLOEXEC);
 
 	if (kvp_fd < 0) {
 		syslog(LOG_ERR, "open /dev/vmbus/hv_kvp failed; error: %d %s",


Patches currently in stable-queue which might be from vkuznets@redhat.com are

queue-4.4/drivers-hv-balloon-keep-track-of-where-ha_region-starts.patch
queue-4.4/drivers-hv-get-rid-of-timeout-in-vmbus_open.patch
queue-4.4/hv-don-t-reset-hv_context.tsc_page-on-crash.patch
queue-4.4/drivers-hv-don-t-leak-memory-in-vmbus_establish_gpadl.patch
queue-4.4/tools-hv-kvp-ensure-kvp-device-fd-is-closed-on-exec.patch
queue-4.4/drivers-hv-balloon-account-for-gaps-in-hot-add-regions.patch

                 reply	other threads:[~2017-04-25 12:24 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=1493122851149206@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=kys@microsoft.com \
    --cc=stable-commits@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=sumit.semwal@linaro.org \
    --cc=vkuznets@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.