stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Patch "uio_hv_generic: check that host supports monitor page" has been added to the 4.14-stable tree
@ 2018-04-09 12:04 gregkh
  0 siblings, 0 replies; only message in thread
From: gregkh @ 2018-04-09 12:04 UTC (permalink / raw)
  To: stephen, alexander.levin, gregkh, sthemmin; +Cc: stable, stable-commits


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

    uio_hv_generic: check that host supports monitor page

to the 4.14-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:
     uio_hv_generic-check-that-host-supports-monitor-page.patch
and it can be found in the queue-4.14 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 foo@baz Mon Apr  9 13:58:16 CEST 2018
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Tue, 9 Jan 2018 12:57:31 -0800
Subject: uio_hv_generic: check that host supports monitor page

From: Stephen Hemminger <stephen@networkplumber.org>


[ Upstream commit 06028d15177a1b406b7b075ea47c6a352732f23a ]

In order for userspace application to signal host, it needs the
host to support the monitor page property. Check for the flag
and fail if this is not supported.

Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/uio/uio_hv_generic.c |    7 +++++++
 1 file changed, 7 insertions(+)

--- a/drivers/uio/uio_hv_generic.c
+++ b/drivers/uio/uio_hv_generic.c
@@ -124,6 +124,13 @@ hv_uio_probe(struct hv_device *dev,
 	if (ret)
 		goto fail;
 
+	/* Communicating with host has to be via shared memory not hypercall */
+	if (!dev->channel->offermsg.monitor_allocated) {
+		dev_err(&dev->device, "vmbus channel requires hypercall\n");
+		ret = -ENOTSUPP;
+		goto fail_close;
+	}
+
 	dev->channel->inbound.ring_buffer->interrupt_mask = 1;
 	set_channel_read_mode(dev->channel, HV_CALL_DIRECT);
 


Patches currently in stable-queue which might be from stephen@networkplumber.org are

queue-4.14/uio_hv_generic-check-that-host-supports-monitor-page.patch

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2018-04-09 12:07 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-04-09 12:04 Patch "uio_hv_generic: check that host supports monitor page" has been added to the 4.14-stable tree gregkh

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).