Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp2260460imm; Thu, 18 Oct 2018 11:34:30 -0700 (PDT) X-Google-Smtp-Source: ACcGV62gQhShCnknzLOEC6BHVJV+rwUv+6aZGUHMd9f/wu9hy6KF0cjJu///EJqBV/yzvFmCjJPn X-Received: by 2002:a62:1693:: with SMTP id 141-v6mr23401514pfw.183.1539887670878; Thu, 18 Oct 2018 11:34:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539887670; cv=none; d=google.com; s=arc-20160816; b=m8loGQg9Li9f2PEJysCzebWAZmFufsLBTBsa0ZoTiTBHaVP0EdVModz0ilHSIU9d6Q j1bo/Xoq+8Vb7QWf7LCuS2V77bepjkQDBrMOubj2lIY66aFo9ivUrUu26y7FaeDEYmv6 FlHbS3b1RPqG11PcLITrS1oKNMAgH/VIKcCziSBrhfQ1ImZsFNuxNEyfaDunDnbgopum tfwylOtvQdrMjRsc4cBwHK+V1QVas4Kq7s3IzkNHiFlgXIU/jkpcuvDGPCwE8c8g46SH aqQsiAfqMT/IBzrHhydkonICai164RIadlEjywJhmShfuwXG7REdFv0FVIpSKHzP692i x6Xw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=TG8UFjmwE4hmJH4ijWzYrZ5yoEjfPx0doR9OVIAmlc4=; b=UzIrTpNL9I9XjPbvzVVSRtQpPWY2A9Q+4r7LUmQKnLYsBulqNyFQ2x99hUwpWrMjfw T5nsGnGBPKD6jfSzSHnTSKjW07isEL9YlnmBiL0sUwSb6zr/bHCQnl62XouIBEodzDgB Z29ADvhEF3k7KpU1XHMhesOzdp0hktEkiOgwQL4RDbMrWprPoKbbll/dONb2FAgRSmNg yFKmIFcqKPww+LfeCi5BTz4XlOWI990lxAk0go+VElPqSh0J29I/sJdfaXvy9XZIpQaz FdTyGuHn3LHzx3w9pBo2ZjiP4hDgijt3AN/p41Ef3TsN8BDT03Ohh2ahh9vi2fzFmYuO ScjA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=d6ZF09ol; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w19-v6si15019060pgf.197.2018.10.18.11.34.15; Thu, 18 Oct 2018 11:34:30 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=d6ZF09ol; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730568AbeJSCI5 (ORCPT + 99 others); Thu, 18 Oct 2018 22:08:57 -0400 Received: from mail.kernel.org ([198.145.29.99]:58216 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729150AbeJSCI5 (ORCPT ); Thu, 18 Oct 2018 22:08:57 -0400 Received: from localhost (ip-213-127-77-176.ip.prioritytelecom.net [213.127.77.176]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 41B05204FD; Thu, 18 Oct 2018 18:06:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1539886009; bh=9pAGrqXcytAeRffkWl6O7Fh2zOEXigxSvBLbQDoTL4I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=d6ZF09olk4LNSpjfmFI8aQYzIi0VzJ+zjxg2eUlTHID1Spy6brzPIaMIEKc6gxz3u QzNNqSGBFuChpFoC402rfmoLXa4/RUv3zIy1PJvEdRVjfFNoebmw2xHp2TOqXIKe2Q KuNYyeh8/mt8rFT+xEwYSvS284vu9c4HUxOCAAlk= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, "K. Y. Srinivasan" , Dexuan Cui Subject: [PATCH 4.4 45/48] Drivers: hv: utils: Invoke the poll function after handshake Date: Thu, 18 Oct 2018 19:55:20 +0200 Message-Id: <20181018175430.310703510@linuxfoundation.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181018175427.133690306@linuxfoundation.org> References: <20181018175427.133690306@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.4-stable review patch. If anyone has any objections, please let me know. ------------------ From: K. Y. Srinivasan commit 2d0c3b5ad739697a68dc8a444f5b9f4817cf8f8f upstream. When the handshake with daemon is complete, we should poll the channel since during the handshake, we will not be processing any messages. This is a potential bug if the host is waiting for a response from the guest. I would like to thank Dexuan for pointing this out. Signed-off-by: K. Y. Srinivasan Signed-off-by: Dexuan Cui Signed-off-by: Greg Kroah-Hartman --- drivers/hv/hv_kvp.c | 2 +- drivers/hv/hv_snapshot.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) --- a/drivers/hv/hv_kvp.c +++ b/drivers/hv/hv_kvp.c @@ -155,7 +155,7 @@ static int kvp_handle_handshake(struct h pr_debug("KVP: userspace daemon ver. %d registered\n", KVP_OP_REGISTER); kvp_register(dm_reg_value); - kvp_transaction.state = HVUTIL_READY; + hv_poll_channel(kvp_transaction.recv_channel, kvp_poll_wrapper); return 0; } --- a/drivers/hv/hv_snapshot.c +++ b/drivers/hv/hv_snapshot.c @@ -114,7 +114,7 @@ static int vss_handle_handshake(struct h default: return -EINVAL; } - vss_transaction.state = HVUTIL_READY; + hv_poll_channel(vss_transaction.recv_channel, vss_poll_wrapper); pr_debug("VSS: userspace daemon ver. %d registered\n", dm_reg_value); return 0; }