Commit bbd55867 authored by Dexuan Cui's avatar Dexuan Cui Committed by Khalid Elmously

vmbus: fix missing signaling in hv_signal_on_read()

BugLink: http://bugs.launchpad.net/bugs/1826416

[Fixes upstream in a much larger set of patches that are not worth backporting
to 4.9 - gregkh]

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: 433e19cf ("Drivers: hv: vmbus: finally fix hv_need_to_signal_on_read()")
Signed-off-by: default avatarJohn Starks <jon.Starks@microsoft.com>
Signed-off-by: default avatarDexuan Cui <decui@microsoft.com>
Signed-off-by: default avatarStephen Hemminger <sthemmin@microsoft.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 13c5e977 linux-4.9.y)
Signed-off-by: default avatarMarcelo Henrique Cerri <marcelo.cerri@canonical.com>
Acked-by: default avatarKamal Mostafa <kamal@canonical.com>
Acked-by: default avatarConnor Kuehl <connor.kuehl@canonical.com>
Signed-off-by: default avatarKleber Sacilotto de Souza <kleber.souza@canonical.com>
parent dd41f6d3
......@@ -1520,11 +1520,11 @@ 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)
if (cached_write_sz <= pending_sz)
vmbus_setevent(channel);
return;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment