Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1565507 > unrolled thread

[PATCH] Drivers: hv: vmbus: finally fix hv_need_to_signal_on_read()

Started byDexuan Cui <decui@microsoft.com>
First post2017-01-24 08:00 +0100
Last post2017-01-26 08:50 +0100
Articles 14 — 4 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] Drivers: hv: vmbus: finally fix hv_need_to_signal_on_read() Dexuan Cui <decui@microsoft.com> - 2017-01-24 08:00 +0100
    Re: [PATCH] Drivers: hv: vmbus: finally fix  hv_need_to_signal_on_read() Stephen Hemminger <stephen@networkplumber.org> - 2017-01-24 17:10 +0100
      RE: [PATCH] Drivers: hv: vmbus: finally fix  hv_need_to_signal_on_read() Dexuan Cui <decui@microsoft.com> - 2017-01-26 07:20 +0100
        Re: [PATCH] Drivers: hv: vmbus: finally fix  hv_need_to_signal_on_read() "gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org> - 2017-01-26 08:20 +0100
          Re: [PATCH] Drivers: hv: vmbus: finally fix  hv_need_to_signal_on_read() "gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org> - 2017-01-26 08:50 +0100
            RE: [PATCH] Drivers: hv: vmbus: finally fix  hv_need_to_signal_on_read() Dexuan Cui <decui@microsoft.com> - 2017-01-26 09:30 +0100
              Re: [PATCH] Drivers: hv: vmbus: finally fix  hv_need_to_signal_on_read() "gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org> - 2017-01-26 10:20 +0100
                RE: [PATCH] Drivers: hv: vmbus: finally fix  hv_need_to_signal_on_read() Dexuan Cui <decui@microsoft.com> - 2017-01-26 10:40 +0100
                  Re: [PATCH] Drivers: hv: vmbus: finally fix  hv_need_to_signal_on_read() "gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org> - 2017-01-26 11:20 +0100
                    RE: [PATCH] Drivers: hv: vmbus: finally fix  hv_need_to_signal_on_read() Dexuan Cui <decui@microsoft.com> - 2017-01-26 11:30 +0100
                      Re: [PATCH] Drivers: hv: vmbus: finally fix  hv_need_to_signal_on_read() "gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org> - 2017-01-26 11:30 +0100
                        RE: [PATCH] Drivers: hv: vmbus: finally fix  hv_need_to_signal_on_read() Dexuan Cui <decui@microsoft.com> - 2017-01-26 11:40 +0100
                        RE: [PATCH] Drivers: hv: vmbus: finally fix  hv_need_to_signal_on_read() KY Srinivasan <kys@microsoft.com> - 2017-01-26 20:20 +0100
          RE: [PATCH] Drivers: hv: vmbus: finally fix  hv_need_to_signal_on_read() Dexuan Cui <decui@microsoft.com> - 2017-01-26 08:50 +0100

#1565507 — [PATCH] Drivers: hv: vmbus: finally fix hv_need_to_signal_on_read()

FromDexuan Cui <decui@microsoft.com>
Date2017-01-24 08:00 +0100
Subject[PATCH] Drivers: hv: vmbus: finally fix hv_need_to_signal_on_read()
Message-ID<t33fc-T4-1@gated-at.bofh.it>
Commit a389fcfd2cb5 ("Drivers: hv: vmbus: Fix signaling logic in hv_need_to_signal_on_read()")
added the proper mb(), but removed the test "prev_write_sz < pending_sz"
when making the signal decision.

As a result, the guest can signal the host unnecessarily,
and then the host can throttle the guest because the host
thinks the guest is buggy or malicious; finally the user
running stress test can perceive intermittent freeze of
the guest.

This patch brings back the test, and properly handles the
in-place consumption APIs used by NetVSC (see get_next_pkt_raw(),
put_pkt_raw() and commit_rd_index()).

Fixes: a389fcfd2cb5 ("Drivers: hv: vmbus: Fix signaling logic in hv_need_to_signal_on_read()")
Signed-off-by: Dexuan Cui <decui@microsoft.com>
Reported-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
Tested-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
Cc: "K. Y. Srinivasan" <kys@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Cc: Stephen Hemminger <sthemmin@microsoft.com>
Cc: <stable@vger.kernel.org>
---

The patch also changes drivers/net/hyperv/netvsc.c (Haiyang Zhang
and Stephen Hemminger have known about this patch).

This is a must, because only applying the VMBus changes will
break the netvsc driver, so the patch should go through the
char-misc tree as a whole.

The changes to netvsc.c are small enough, and hence there should be
no conflict.

 drivers/hv/ring_buffer.c    |  1 +
 drivers/net/hyperv/netvsc.c |  6 ++++++
 include/linux/hyperv.h      | 32 ++++++++++++++++++++++++++++++--
 3 files changed, 37 insertions(+), 2 deletions(-)

diff --git a/drivers/hv/ring_buffer.c b/drivers/hv/ring_buffer.c
index cd49cb1..308dbda 100644
--- a/drivers/hv/ring_buffer.c
+++ b/drivers/hv/ring_buffer.c
@@ -383,6 +383,7 @@ int hv_ringbuffer_read(struct vmbus_channel *channel,
 		return ret;
 	}
 
+	init_cached_read_index(channel);
 	next_read_location = hv_get_next_read_location(inring_info);
 	next_read_location = hv_copyfrom_ringbuffer(inring_info, &desc,
 						    sizeof(desc),
diff --git a/drivers/net/hyperv/netvsc.c b/drivers/net/hyperv/netvsc.c
index 5a1cc08..86e5749 100644
--- a/drivers/net/hyperv/netvsc.c
+++ b/drivers/net/hyperv/netvsc.c
@@ -1295,6 +1295,9 @@ void netvsc_channel_cb(void *context)
 	ndev = hv_get_drvdata(device);
 	buffer = get_per_channel_state(channel);
 
+	/* commit_rd_index() -> hv_signal_on_read() needs this. */
+	init_cached_read_index(channel);
+
 	do {
 		desc = get_next_pkt_raw(channel);
 		if (desc != NULL) {
@@ -1347,6 +1350,9 @@ void netvsc_channel_cb(void *context)
 
 			bufferlen = bytes_recvd;
 		}
+
+		init_cached_read_index(channel);
+
 	} while (1);
 
 	if (bufferlen > NETVSC_PACKET_SIZE)
diff --git a/include/linux/hyperv.h b/include/linux/hyperv.h
index 42fe43f..183efde 100644
--- a/include/linux/hyperv.h
+++ b/include/linux/hyperv.h
@@ -128,6 +128,7 @@ struct hv_ring_buffer_info {
 	u32 ring_data_startoffset;
 	u32 priv_write_index;
 	u32 priv_read_index;
+	u32 cached_read_index;
 };
 
 /*
@@ -180,6 +181,19 @@ static inline u32 hv_get_bytes_to_write(struct hv_ring_buffer_info *rbi)
 	return write;
 }
 
+static inline u32 hv_get_cached_bytes_to_write(
+	const struct hv_ring_buffer_info *rbi)
+{
+	u32 read_loc, write_loc, dsize, write;
+
+	dsize = rbi->ring_datasize;
+	read_loc = rbi->cached_read_index;
+	write_loc = rbi->ring_buffer->write_index;
+
+	write = write_loc >= read_loc ? dsize - (write_loc - read_loc) :
+		read_loc - write_loc;
+	return write;
+}
 /*
  * VMBUS version is 32 bit entity broken up into
  * two 16 bit quantities: major_number. minor_number.
@@ -1488,7 +1502,7 @@ hv_get_ring_buffer(struct hv_ring_buffer_info *ring_info)
 
 static inline  void hv_signal_on_read(struct vmbus_channel *channel)
 {
-	u32 cur_write_sz;
+	u32 cur_write_sz, cached_write_sz;
 	u32 pending_sz;
 	struct hv_ring_buffer_info *rbi = &channel->inbound;
 
@@ -1512,12 +1526,24 @@ static inline  void hv_signal_on_read(struct vmbus_channel *channel)
 
 	cur_write_sz = hv_get_bytes_to_write(rbi);
 
-	if (cur_write_sz >= pending_sz)
+	if (cur_write_sz < pending_sz)
+		return;
+
+	cached_write_sz = hv_get_cached_bytes_to_write(rbi);
+	if (cached_write_sz < pending_sz)
 		vmbus_setevent(channel);
 
 	return;
 }
 
+static inline void
+init_cached_read_index(struct vmbus_channel *channel)
+{
+	struct hv_ring_buffer_info *rbi = &channel->inbound;
+
+	rbi->cached_read_index = rbi->ring_buffer->read_index;
+}
+
 /*
  * An API to support in-place processing of incoming VMBUS packets.
  */
@@ -1569,6 +1595,8 @@ static inline void put_pkt_raw(struct vmbus_channel *channel,
  * This call commits the read index and potentially signals the host.
  * Here is the pattern for using the "in-place" consumption APIs:
  *
+ * init_cached_read_index();
+ *
  * while (get_next_pkt_raw() {
  *	process the packet "in-place";
  *	put_pkt_raw();
-- 
2.1.0

[toc] | [next] | [standalone]


#1565961 — Re: [PATCH] Drivers: hv: vmbus: finally fix hv_need_to_signal_on_read()

FromStephen Hemminger <stephen@networkplumber.org>
Date2017-01-24 17:10 +0100
SubjectRe: [PATCH] Drivers: hv: vmbus: finally fix hv_need_to_signal_on_read()
Message-ID<t3bPs-6sB-15@gated-at.bofh.it>
In reply to#1565507
On Tue, 24 Jan 2017 06:54:46 +0000
Dexuan Cui <decui@microsoft.com> wrote:

> +static inline void
> +init_cached_read_index(struct vmbus_channel *channel)
> +{
> +	struct hv_ring_buffer_info *rbi = &channel->inbound;
> +
> +	rbi->cached_read_index = rbi->ring_buffer->read_index;
> +}

Looks good thanks. This should go in right away. Which versions are impacted?
Should it also go to stable?

In a future patch, the API function names for interacting with the ring buffer
should be changed to all have common prefix (hv_) and maybe do a little rethinking
about what needs to be in ring buffer and what could be local variables.

For example, the cached_read_index is only useful over the span of the loop
reading from the ring buffer. For me, it would be cleaner with a ring_buffer
iterator object which could abstract the API better. 

	struct vmbus_ringbuffer_iter iter;

	vmbus_begin_read(&iter, channel);
	while ((desc = vmbus_next_read(&iter), channel) {
	    ...
	}
	vmbus_end_read(&iter, channel);

[toc] | [prev] | [next] | [standalone]


#1567131 — RE: [PATCH] Drivers: hv: vmbus: finally fix hv_need_to_signal_on_read()

FromDexuan Cui <decui@microsoft.com>
Date2017-01-26 07:20 +0100
SubjectRE: [PATCH] Drivers: hv: vmbus: finally fix hv_need_to_signal_on_read()
Message-ID<t3Lzz-3RH-1@gated-at.bofh.it>
In reply to#1565961
> From: Stephen Hemminger [mailto:stephen@networkplumber.org]
> Sent: Wednesday, January 25, 2017 00:08
> To: Dexuan Cui <decui@microsoft.com>
> Cc: gregkh@linuxfoundation.org; driverdev-devel@linuxdriverproject.org; KY
> Srinivasan <kys@microsoft.com>; Haiyang Zhang <haiyangz@microsoft.com>;
> Stephen Hemminger <sthemmin@microsoft.com>; olaf@aepfle.de; Rolf
> Neugebauer <rolf.neugebauer@docker.com>; jasowang@redhat.com; linux-
> kernel@vger.kernel.org; apw@canonical.com
> Subject: Re: [PATCH] Drivers: hv: vmbus: finally fix hv_need_to_signal_on_read()
> 
> On Tue, 24 Jan 2017 06:54:46 +0000
> Dexuan Cui <decui@microsoft.com> wrote:
> 
> > +static inline void
> > +init_cached_read_index(struct vmbus_channel *channel)
> > +{
> > +	struct hv_ring_buffer_info *rbi = &channel->inbound;
> > +
> > +	rbi->cached_read_index = rbi->ring_buffer->read_index;
> > +}
> 
> Looks good thanks. This should go in right away. Which versions are impacted?
> Should it also go to stable?

Yes, it needs to go to stable.
I have Cc-ed  <stable@vger.kernel.org> in the patch's changelog, so it should be
included in the stable tree automatically.

As I checked against the kernels listed on the homapage of www.kernel.org, the
below versions are impacted:
v3.16.39
v3.18.47
v4.1.38
v4.8.17
v4.9.5
v4.10-rc5

It's interesting v4.4.44 is not impacted, but actually it needs both the 2 patches:
i.e. this patch, and the previous one:
Commit a389fcfd2cb5 ("Drivers: hv: vmbus: Fix signaling logic in hv_need_to_signal_on_read()")

> In a future patch, the API function names for interacting with the ring buffer
> should be changed to all have common prefix (hv_) and maybe do a little
> rethinking  about what needs to be in ring buffer and what could be local variables.
> 
> For example, the cached_read_index is only useful over the span of the loop
> reading from the ring buffer. For me, it would be cleaner with a ring_buffer
> iterator object which could abstract the API better.
> 
> 	struct vmbus_ringbuffer_iter iter;
> 
> 	vmbus_begin_read(&iter, channel);
> 	while ((desc = vmbus_next_read(&iter), channel) {
> 	    ...
> 	}
> 	vmbus_end_read(&iter, channel);

I agree. Please help to clean all these up.  :-)

Thanks,
-- Dexuan

[toc] | [prev] | [next] | [standalone]


#1567138 — Re: [PATCH] Drivers: hv: vmbus: finally fix hv_need_to_signal_on_read()

From"gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>
Date2017-01-26 08:20 +0100
SubjectRe: [PATCH] Drivers: hv: vmbus: finally fix hv_need_to_signal_on_read()
Message-ID<t3MvD-4pB-9@gated-at.bofh.it>
In reply to#1567131
On Thu, Jan 26, 2017 at 06:10:19AM +0000, Dexuan Cui wrote:
> > From: Stephen Hemminger [mailto:stephen@networkplumber.org]
> > Sent: Wednesday, January 25, 2017 00:08
> > To: Dexuan Cui <decui@microsoft.com>
> > Cc: gregkh@linuxfoundation.org; driverdev-devel@linuxdriverproject.org; KY
> > Srinivasan <kys@microsoft.com>; Haiyang Zhang <haiyangz@microsoft.com>;
> > Stephen Hemminger <sthemmin@microsoft.com>; olaf@aepfle.de; Rolf
> > Neugebauer <rolf.neugebauer@docker.com>; jasowang@redhat.com; linux-
> > kernel@vger.kernel.org; apw@canonical.com
> > Subject: Re: [PATCH] Drivers: hv: vmbus: finally fix hv_need_to_signal_on_read()
> > 
> > On Tue, 24 Jan 2017 06:54:46 +0000
> > Dexuan Cui <decui@microsoft.com> wrote:
> > 
> > > +static inline void
> > > +init_cached_read_index(struct vmbus_channel *channel)
> > > +{
> > > +	struct hv_ring_buffer_info *rbi = &channel->inbound;
> > > +
> > > +	rbi->cached_read_index = rbi->ring_buffer->read_index;
> > > +}
> > 
> > Looks good thanks. This should go in right away. Which versions are impacted?
> > Should it also go to stable?
> 
> Yes, it needs to go to stable.
> I have Cc-ed  <stable@vger.kernel.org> in the patch's changelog, so it should be
> included in the stable tree automatically.
> 
> As I checked against the kernels listed on the homapage of www.kernel.org, the
> below versions are impacted:
> v3.16.39
> v3.18.47
> v4.1.38
> v4.8.17
> v4.9.5
> v4.10-rc5
> 
> It's interesting v4.4.44 is not impacted, but actually it needs both the 2 patches:
> i.e. this patch, and the previous one:
> Commit a389fcfd2cb5 ("Drivers: hv: vmbus: Fix signaling logic in hv_need_to_signal_on_read()")

That patch does not apply to the 4.4-stable tree, which is why it was
not included there.  If you feel it should be included, please provide a
backport and send it to the stable@vger.kernel.org mailing list.

thanks,

greg k-h

[toc] | [prev] | [next] | [standalone]


#1567152 — Re: [PATCH] Drivers: hv: vmbus: finally fix hv_need_to_signal_on_read()

From"gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>
Date2017-01-26 08:50 +0100
SubjectRe: [PATCH] Drivers: hv: vmbus: finally fix hv_need_to_signal_on_read()
Message-ID<t3MYG-4yO-23@gated-at.bofh.it>
In reply to#1567138
On Thu, Jan 26, 2017 at 07:44:46AM +0000, Dexuan Cui wrote:
> > From: gregkh@linuxfoundation.org [mailto:gregkh@linuxfoundation.org]
> > > Dexuan Cui <decui@microsoft.com> wrote:
> > > As I checked against the kernels listed on the homapage,
> > > the below versions are impacted:
> > > v3.16.39
> > > v3.18.47
> > > v4.1.38
> > > v4.8.17
> > > v4.9.5
> > > v4.10-rc5
> > >
> > > It's interesting v4.4.44 is not impacted, but actually it needs both the 2 patches:
> > > i.e. this patch, and the previous one:
> > > Commit a389fcfd2cb5 ("Drivers: hv: vmbus: Fix signaling logic in
> > hv_need_to_signal_on_read()")
> > 
> > That patch does not apply to the 4.4-stable tree, which is why it was
> > not included there.  If you feel it should be included, please provide a
> > backport and send it to the stable@vger.kernel.org mailing list.
> > 
> > greg k-h
> 
> Thanks! I'll do the backport after this patch goes in the mainline.

Why wait?

[toc] | [prev] | [next] | [standalone]


#1567167 — RE: [PATCH] Drivers: hv: vmbus: finally fix hv_need_to_signal_on_read()

FromDexuan Cui <decui@microsoft.com>
Date2017-01-26 09:30 +0100
SubjectRE: [PATCH] Drivers: hv: vmbus: finally fix hv_need_to_signal_on_read()
Message-ID<t3NBn-50M-3@gated-at.bofh.it>
In reply to#1567152
> From: gregkh@linuxfoundation.org [mailto:gregkh@linuxfoundation.org]
> > > > It's interesting v4.4.44 is not impacted, but actually it needs both the 2
> patches:
> > > > i.e. this patch, and the previous one:
> > > > Commit a389fcfd2cb5 ("Drivers: hv: vmbus: Fix signaling logic in
> > > hv_need_to_signal_on_read()")
> > >
> > > That patch does not apply to the 4.4-stable tree, which is why it was
> > > not included there.  If you feel it should be included, please provide a
> > > backport and send it to the stable@vger.kernel.org mailing list.
> > >
> > > greg k-h
> >
> > Thanks! I'll do the backport after this patch goes in the mainline.
> 
> Why wait?

I thought a patch must first appear in Linus's tree, before it can be
back-ported to the stable tree?

-- Dexuan

[toc] | [prev] | [next] | [standalone]


#1567204 — Re: [PATCH] Drivers: hv: vmbus: finally fix hv_need_to_signal_on_read()

From"gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>
Date2017-01-26 10:20 +0100
SubjectRe: [PATCH] Drivers: hv: vmbus: finally fix hv_need_to_signal_on_read()
Message-ID<t3OnM-5wh-7@gated-at.bofh.it>
In reply to#1567167
On Thu, Jan 26, 2017 at 08:27:26AM +0000, Dexuan Cui wrote:
> > From: gregkh@linuxfoundation.org [mailto:gregkh@linuxfoundation.org]
> > > > > It's interesting v4.4.44 is not impacted, but actually it needs both the 2
> > patches:
> > > > > i.e. this patch, and the previous one:
> > > > > Commit a389fcfd2cb5 ("Drivers: hv: vmbus: Fix signaling logic in
> > > > hv_need_to_signal_on_read()")
> > > >
> > > > That patch does not apply to the 4.4-stable tree, which is why it was
> > > > not included there.  If you feel it should be included, please provide a
> > > > backport and send it to the stable@vger.kernel.org mailing list.
> > > >
> > > > greg k-h
> > >
> > > Thanks! I'll do the backport after this patch goes in the mainline.
> > 
> > Why wait?
> 
> I thought a patch must first appear in Linus's tree, before it can be
> back-ported to the stable tree?

Commit a389fcfd2cb5 _IS_ in Linus's tree, it was released in the 4.7-rc1
kernel, which happened in May of 2016.

thanks,

greg k-h

[toc] | [prev] | [next] | [standalone]


#1567232 — RE: [PATCH] Drivers: hv: vmbus: finally fix hv_need_to_signal_on_read()

FromDexuan Cui <decui@microsoft.com>
Date2017-01-26 10:40 +0100
SubjectRE: [PATCH] Drivers: hv: vmbus: finally fix hv_need_to_signal_on_read()
Message-ID<t3OH9-5Cz-33@gated-at.bofh.it>
In reply to#1567204
> From: gregkh@linuxfoundation.org [mailto:gregkh@linuxfoundation.org]
> > > From: gregkh@linuxfoundation.org [mailto:gregkh@linuxfoundation.org]
> > > > > > It's interesting v4.4.44 is not impacted, but actually it needs both the 2
> > > patches:
> > > > > > i.e. this patch, and the previous one:
> > > > > > Commit a389fcfd2cb5 ("Drivers: hv: vmbus: Fix signaling logic in
> > > > > hv_need_to_signal_on_read()")
> > > > >
> > > > > That patch does not apply to the 4.4-stable tree, which is why it was
> > > > > not included there.  If you feel it should be included, please provide a
> > > > > backport and send it to the stable@vger.kernel.org mailing list.
> > > > >
> > > > > greg k-h
> > > >
> > > > Thanks! I'll do the backport after this patch goes in the mainline.
> > >
> > > Why wait?
> >
> > I thought a patch must first appear in Linus's tree, before it can be
> > back-ported to the stable tree?
> 
> Commit a389fcfd2cb5 _IS_ in Linus's tree, it was released in the 4.7-rc1
> kernel, which happened in May of 2016.
> 
> greg k-h

Sorry, it looks I didn't make it clear. :-)

v4.4.44 needs 2 patches, i.e. a389fcfd2cb5, and this patch (which is not in
Linus's tree yet).  Only backporting the first patch immediately is not enough
and is also improper IMO, because the first patch introduces a new issue,
which is being resolved by this patch. So my understanding is that I should
backport the 2 patches together.

Thanks,
-- Dexuan

[toc] | [prev] | [next] | [standalone]


#1567273 — Re: [PATCH] Drivers: hv: vmbus: finally fix hv_need_to_signal_on_read()

From"gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>
Date2017-01-26 11:20 +0100
SubjectRe: [PATCH] Drivers: hv: vmbus: finally fix hv_need_to_signal_on_read()
Message-ID<t3PjQ-65h-25@gated-at.bofh.it>
In reply to#1567232
On Thu, Jan 26, 2017 at 09:31:32AM +0000, Dexuan Cui wrote:
> > From: gregkh@linuxfoundation.org [mailto:gregkh@linuxfoundation.org]
> > > > From: gregkh@linuxfoundation.org [mailto:gregkh@linuxfoundation.org]
> > > > > > > It's interesting v4.4.44 is not impacted, but actually it needs both the 2
> > > > patches:
> > > > > > > i.e. this patch, and the previous one:
> > > > > > > Commit a389fcfd2cb5 ("Drivers: hv: vmbus: Fix signaling logic in
> > > > > > hv_need_to_signal_on_read()")
> > > > > >
> > > > > > That patch does not apply to the 4.4-stable tree, which is why it was
> > > > > > not included there.  If you feel it should be included, please provide a
> > > > > > backport and send it to the stable@vger.kernel.org mailing list.
> > > > > >
> > > > > > greg k-h
> > > > >
> > > > > Thanks! I'll do the backport after this patch goes in the mainline.
> > > >
> > > > Why wait?
> > >
> > > I thought a patch must first appear in Linus's tree, before it can be
> > > back-ported to the stable tree?
> > 
> > Commit a389fcfd2cb5 _IS_ in Linus's tree, it was released in the 4.7-rc1
> > kernel, which happened in May of 2016.
> > 
> > greg k-h
> 
> Sorry, it looks I didn't make it clear. :-)
> 
> v4.4.44 needs 2 patches, i.e. a389fcfd2cb5, and this patch (which is not in
> Linus's tree yet).  Only backporting the first patch immediately is not enough
> and is also improper IMO, because the first patch introduces a new issue,
> which is being resolved by this patch. So my understanding is that I should
> backport the 2 patches together.

Ok, that makes a bit more sense, thanks.  I'll wait for your "real"
patch to hit Linus's tree then.

greg k-h

[toc] | [prev] | [next] | [standalone]


#1567293 — RE: [PATCH] Drivers: hv: vmbus: finally fix hv_need_to_signal_on_read()

FromDexuan Cui <decui@microsoft.com>
Date2017-01-26 11:30 +0100
SubjectRE: [PATCH] Drivers: hv: vmbus: finally fix hv_need_to_signal_on_read()
Message-ID<t3Ptx-68L-47@gated-at.bofh.it>
In reply to#1567273
> From: gregkh@linuxfoundation.org [mailto:gregkh@linuxfoundation.org]
> To: Dexuan Cui <decui@microsoft.com>
> >
> > v4.4.44 needs 2 patches, i.e. a389fcfd2cb5, and this patch (which is not in
> > Linus's tree yet).  Only backporting the first patch immediately is not enough
> > and is also improper IMO, because the first patch introduces a new issue,
> > which is being resolved by this patch. So my understanding is that I should
> > backport the 2 patches together.
> 
> Ok, that makes a bit more sense, thanks.  I'll wait for your "real"
> patch to hit Linus's tree then.
> 
> greg k-h

Hi Greg,
I expect this patch (i.e. the "real" patch) would go in your char-misc tree first,
then it would be merged into Linus's tree, as we usually did.

IMO this is an important fix, but it's not so urgent that Linus would notice
it and pick it up directly.

Thanks,
-- Dexuan

[toc] | [prev] | [next] | [standalone]


#1567301 — Re: [PATCH] Drivers: hv: vmbus: finally fix hv_need_to_signal_on_read()

From"gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>
Date2017-01-26 11:30 +0100
SubjectRe: [PATCH] Drivers: hv: vmbus: finally fix hv_need_to_signal_on_read()
Message-ID<t3Pty-68L-67@gated-at.bofh.it>
In reply to#1567293
On Thu, Jan 26, 2017 at 10:24:32AM +0000, Dexuan Cui wrote:
> > From: gregkh@linuxfoundation.org [mailto:gregkh@linuxfoundation.org]
> > To: Dexuan Cui <decui@microsoft.com>
> > >
> > > v4.4.44 needs 2 patches, i.e. a389fcfd2cb5, and this patch (which is not in
> > > Linus's tree yet).  Only backporting the first patch immediately is not enough
> > > and is also improper IMO, because the first patch introduces a new issue,
> > > which is being resolved by this patch. So my understanding is that I should
> > > backport the 2 patches together.
> > 
> > Ok, that makes a bit more sense, thanks.  I'll wait for your "real"
> > patch to hit Linus's tree then.
> > 
> > greg k-h
> 
> Hi Greg,
> I expect this patch (i.e. the "real" patch) would go in your char-misc tree first,
> then it would be merged into Linus's tree, as we usually did.

That's fine, I'll wait for the maintainer of the subsystem to forward it
on to me, like all other hyperv patches :)

Or, at the very least, have one of them ack it so that I can take it...

thanks,

greg k-hmu

> 
> IMO this is an important fix, but it's not so urgent that Linus would notice
> it and pick it up directly.
> 
> Thanks,
> -- Dexuan

[toc] | [prev] | [next] | [standalone]


#1567310 — RE: [PATCH] Drivers: hv: vmbus: finally fix hv_need_to_signal_on_read()

FromDexuan Cui <decui@microsoft.com>
Date2017-01-26 11:40 +0100
SubjectRE: [PATCH] Drivers: hv: vmbus: finally fix hv_need_to_signal_on_read()
Message-ID<t3PDc-6bY-21@gated-at.bofh.it>
In reply to#1567301
> From: gregkh@linuxfoundation.org [mailto:gregkh@linuxfoundation.org]
> > Hi Greg,
> > I expect this patch (i.e. the "real" patch) would go in your char-misc tree first,
> > then it would be merged into Linus's tree, as we usually did.
> 
> That's fine, I'll wait for the maintainer of the subsystem to forward it
> on to me, like all other hyperv patches :)
> 
> Or, at the very least, have one of them ack it so that I can take it...
> thanks,
> 
> greg k-hmu

Got it. Thanks for the clarification!

Thanks,
-- Dexuan

[toc] | [prev] | [next] | [standalone]


#1567655 — RE: [PATCH] Drivers: hv: vmbus: finally fix hv_need_to_signal_on_read()

FromKY Srinivasan <kys@microsoft.com>
Date2017-01-26 20:20 +0100
SubjectRE: [PATCH] Drivers: hv: vmbus: finally fix hv_need_to_signal_on_read()
Message-ID<t3XKq-2N9-5@gated-at.bofh.it>
In reply to#1567301

> -----Original Message-----
> From: gregkh@linuxfoundation.org [mailto:gregkh@linuxfoundation.org]
> Sent: Thursday, January 26, 2017 2:28 AM
> To: Dexuan Cui <decui@microsoft.com>
> Cc: Stephen Hemminger <stephen@networkplumber.org>; driverdev-
> devel@linuxdriverproject.org; KY Srinivasan <kys@microsoft.com>; Haiyang
> Zhang <haiyangz@microsoft.com>; Stephen Hemminger
> <sthemmin@microsoft.com>; olaf@aepfle.de; Rolf Neugebauer
> <rolf.neugebauer@docker.com>; jasowang@redhat.com; linux-
> kernel@vger.kernel.org; apw@canonical.com
> Subject: Re: [PATCH] Drivers: hv: vmbus: finally fix
> hv_need_to_signal_on_read()
> 
> On Thu, Jan 26, 2017 at 10:24:32AM +0000, Dexuan Cui wrote:
> > > From: gregkh@linuxfoundation.org [mailto:gregkh@linuxfoundation.org]
> > > To: Dexuan Cui <decui@microsoft.com>
> > > >
> > > > v4.4.44 needs 2 patches, i.e. a389fcfd2cb5, and this patch (which is not
> in
> > > > Linus's tree yet).  Only backporting the first patch immediately is not
> enough
> > > > and is also improper IMO, because the first patch introduces a new
> issue,
> > > > which is being resolved by this patch. So my understanding is that I
> should
> > > > backport the 2 patches together.
> > >
> > > Ok, that makes a bit more sense, thanks.  I'll wait for your "real"
> > > patch to hit Linus's tree then.
> > >
> > > greg k-h
> >
> > Hi Greg,
> > I expect this patch (i.e. the "real" patch) would go in your char-misc tree
> first,
> > then it would be merged into Linus's tree, as we usually did.
> 
> That's fine, I'll wait for the maintainer of the subsystem to forward it
> on to me, like all other hyperv patches :)

I am putting together a set that I will be forwarding that includes this patch.

K. Y
> 
> Or, at the very least, have one of them ack it so that I can take it...
> 
> thanks,
> 
> greg k-hmu
> 
> >
> > IMO this is an important fix, but it's not so urgent that Linus would notice
> > it and pick it up directly.
> >
> > Thanks,
> > -- Dexuan

[toc] | [prev] | [next] | [standalone]


#1567153 — RE: [PATCH] Drivers: hv: vmbus: finally fix hv_need_to_signal_on_read()

FromDexuan Cui <decui@microsoft.com>
Date2017-01-26 08:50 +0100
SubjectRE: [PATCH] Drivers: hv: vmbus: finally fix hv_need_to_signal_on_read()
Message-ID<t3MYG-4yO-25@gated-at.bofh.it>
In reply to#1567138
> From: gregkh@linuxfoundation.org [mailto:gregkh@linuxfoundation.org]
> > Dexuan Cui <decui@microsoft.com> wrote:
> > As I checked against the kernels listed on the homapage,
> > the below versions are impacted:
> > v3.16.39
> > v3.18.47
> > v4.1.38
> > v4.8.17
> > v4.9.5
> > v4.10-rc5
> >
> > It's interesting v4.4.44 is not impacted, but actually it needs both the 2 patches:
> > i.e. this patch, and the previous one:
> > Commit a389fcfd2cb5 ("Drivers: hv: vmbus: Fix signaling logic in
> hv_need_to_signal_on_read()")
> 
> That patch does not apply to the 4.4-stable tree, which is why it was
> not included there.  If you feel it should be included, please provide a
> backport and send it to the stable@vger.kernel.org mailing list.
> 
> greg k-h

Thanks! I'll do the backport after this patch goes in the mainline.

Thanks,
-- Dexuan

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web