From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.linuxfoundation.org ([140.211.169.12]:39898 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932724AbdJXNHE (ORCPT ); Tue, 24 Oct 2017 09:07:04 -0400 From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, John Starks , Dexuan Cui , Stephen Hemminger Subject: [PATCH 4.9 32/48] vmbus: fix missing signaling in hv_signal_on_read() Date: Tue, 24 Oct 2017 15:03:45 +0200 Message-Id: <20171024125729.175181902@linuxfoundation.org> In-Reply-To: <20171024125727.668462013@linuxfoundation.org> References: <20171024125727.668462013@linuxfoundation.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: stable-owner@vger.kernel.org List-ID: 4.9-stable review patch. If anyone has any objections, please let me know. ------------------ From: Dexuan Cui [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: 433e19cf33d3 ("Drivers: hv: vmbus: finally fix hv_need_to_signal_on_read()") Signed-off-by: John Starks Signed-off-by: Dexuan Cui Signed-off-by: Stephen Hemminger Signed-off-by: Greg Kroah-Hartman --- Hi Greg, as we discussed, I'm resending this patch, and please only apply it to linux-4.9.y (i.e. v4.9.57 as of today). include/linux/hyperv.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/include/linux/hyperv.h +++ b/include/linux/hyperv.h @@ -1521,11 +1521,11 @@ static inline void hv_signal_on_read(st 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;