> From: Stephen Hemminger [mailto:stephen@xxxxxxxxxxxxxxxxxx] > Sent: Wednesday, August 16, 2017 9:16 AM > To: Greg KH <gregkh@xxxxxxxxxxxxxxxxxxx> > Cc: KY Srinivasan <kys@xxxxxxxxxxxxx>; Dexuan Cui <decui@xxxxxxxxxxxxx>; > devel@xxxxxxxxxxxxxxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx; > stable@xxxxxxxxxxxxxxx; Stephen Hemminger <sthemmin@xxxxxxxxxxxxx>; > John Starks <jon.Starks@xxxxxxxxxxxxx> > Subject: Re: [PATCH] vmbus: fix missing signaling in hv_signal_on_read() > > On Wed, 16 Aug 2017 09:10:40 -0700 > Greg KH <gregkh@xxxxxxxxxxxxxxxxxxx> wrote: > > > On Wed, Aug 16, 2017 at 08:49:46AM -0700, Stephen Hemminger wrote: > > > When the space available before start of reading (cached_write_sz) > > > is the same as the host required space (pending_sz), we need to > > > still signal host. > > > > > > Fixes: 433e19cf33d3 ("Drivers: hv: vmbus: finally fix > hv_need_to_signal_on_read()") > > > > > > Signed-off-by: John Starks <jon.Starks@xxxxxxxxxxxxx> > > > Signed-off-by: Dexuan Cui <decui@xxxxxxxxxxxxx> > > > Signed-off-by: Stephen Hemminger <sthemmin@xxxxxxxxxxxxx> > > > --- > > > This patch is for 4.13 (and stable). > > > A different fix is needed for linux-next. > > > > Is there a fix for this in Linus's tree? If so, what's the git commit > > id? We need to wait for that until I can take it in -stable. > > There is no commit yet in Linus's tree. Was submitting for both Linus > and stable. Wasn't sure about the timing since 4.13 might close before he gets > to it. Hi Greg and stable@xxxxxxxxxxxxxxx, We need the patch for the stable kernels: v4.13, v4.12.10 and v4.9.47. The patch is not in Linus's tree, because the bug is resolved there by a series of 4 patches (see the below). IMO it's better to apply this small patch to the stable kernels rather than backporting the 4 big commits? commit 4226ff69a3dff78bead7d9a270423cd21f8d40b8 Author: Stephen Hemminger <stephen@xxxxxxxxxxxxxxxxxx> Date: Sun Jun 25 12:30:24 2017 -0700 vmbus: simplify hv_ringbuffer_read With new iterator functions (and the double mapping) the ring buffer read function can be greatly simplified. Signed-off-by: Stephen Hemminger <sthemmin@xxxxxxxxxxxxx> Signed-off-by: K. Y. Srinivasan <kys@xxxxxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> commit 8dd45f2ab005a1f3301296059b23b03ec3dbf79b Author: Stephen Hemminger <stephen@xxxxxxxxxxxxxxxxxx> Date: Sun Jun 25 12:30:26 2017 -0700 vmbus: refactor hv_signal_on_read The function hv_signal_on_read was defined in hyperv.h and only used in one place in ring_buffer code. Clearer to just move it inline there. Signed-off-by: Stephen Hemminger <sthemmin@xxxxxxxxxxxxx> Signed-off-by: K. Y. Srinivasan <kys@xxxxxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> commit 05d00bc94ac27d220d8a78e365d7fa3a26dcca17 Author: Stephen Hemminger <stephen@xxxxxxxxxxxxxxxxxx> Date: Sun Jun 25 12:30:27 2017 -0700 vmbus: eliminate duplicate cached index Don't need cached read index anymore now that packet iterator is used. The iterator has the original read index until the visible read_index is updated. Signed-off-by: Stephen Hemminger <sthemmin@xxxxxxxxxxxxx> Signed-off-by: K. Y. Srinivasan <kys@xxxxxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> commit 03bad714a1619c0074eb44d6f217c505fe27030f Author: Stephen Hemminger <stephen@xxxxxxxxxxxxxxxxxx> Date: Sun Jun 25 12:30:28 2017 -0700 vmbus: more host signalling avoidance Don't signal host if it has disabled interrupts for that ring buffer. Check the feature bit to see if host supports pending send size flag. Signed-off-by: Stephen Hemminger <sthemmin@xxxxxxxxxxxxx> Signed-off-by: K. Y. Srinivasan <kys@xxxxxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> Thanks, -- Dexuan