Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752717AbdIRN64 (ORCPT ); Mon, 18 Sep 2017 09:58:56 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:57420 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752477AbdIRN6z (ORCPT ); Mon, 18 Sep 2017 09:58:55 -0400 Date: Mon, 18 Sep 2017 15:59:06 +0200 From: Greg KH To: kys@microsoft.com Cc: linux-kernel@vger.kernel.org, devel@linuxdriverproject.org, olaf@aepfle.de, apw@canonical.com, vkuznets@redhat.com, jasowang@redhat.com, leann.ogasawara@canonical.com, marcelo.cerri@canonical.com, sthemmin@microsoft.com Subject: Re: [PATCH V2 2/4] Drivers: hv: fcopy: restore correct transfer length Message-ID: <20170918135906.GB21077@kroah.com> References: <20170918034955.10913-1-kys@exchange.microsoft.com> <20170918035419.11062-1-kys@exchange.microsoft.com> <20170918035419.11062-2-kys@exchange.microsoft.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170918035419.11062-2-kys@exchange.microsoft.com> User-Agent: Mutt/1.9.0 (2017-09-02) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1427 Lines: 31 On Sun, Sep 17, 2017 at 08:54:17PM -0700, kys@exchange.microsoft.com wrote: > From: Olaf Hering > > Till recently the expected length of bytes read by the > daemon did depend on the context. It was either hv_start_fcopy or > hv_do_fcopy. The daemon had a buffer size of two pages, which was much > larger than needed. > > Now the expected length of bytes read by the > daemon changed slightly. For START_FILE_COPY it is still the size of > hv_start_fcopy. But for WRITE_TO_FILE and the other operations it is as > large as the buffer that arrived via vmbus. In case of WRITE_TO_FILE > that is slightly larger than a struct hv_do_fcopy. Since the buffer in > the daemon was still larger everything was fine. > > Currently, the daemon reads only what is actually needed. > The new buffer layout is as large as a struct hv_do_fcopy, for the > WRITE_TO_FILE operation. Since the kernel expects a slightly larger > size, hvt_op_read will return -EINVAL because the daemon will read > slightly less than expected. Address this by restoring the expected > buffer size in case of WRITE_TO_FILE. > > Fixes: 'commit c7e490fc23eb ("Drivers: hv: fcopy: convert to hv_utils_transport")' > Fixes: 'commit 3f2baa8a7d2e ("Tools: hv: update buffer handling in hv_fcopy_daemon")' What's with the 'commit' here? It should look like: Fixes: c7e490fc23eb ("Drivers: hv: fcopy: convert to hv_utils_transport") Please fix...