Received: by 10.223.176.5 with SMTP id f5csp2193639wra; Thu, 8 Feb 2018 09:53:52 -0800 (PST) X-Google-Smtp-Source: AH8x225tlZoq4TiwXYHnK2CHRmqTP+YU9j8uetvgICOmoHn3TbOL3wv8bMqs//EUc2uSFa6SdQR6 X-Received: by 2002:a17:902:6a16:: with SMTP id m22-v6mr19787plk.142.1518112432594; Thu, 08 Feb 2018 09:53:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518112432; cv=none; d=google.com; s=arc-20160816; b=tOAWkFUjLx91zaAUWojKmyzNDqfsmU6BIbDzE4icuOVe4sc5C9Rw9Swf7bn8D3Rc+r 88t/NtzNFK+M0TIaW82MxMjjF8FZX1gPWCp1SKodfhNL1WLxgMLP50PDGkxKWs6Cm+bk kyQyY7VBgcKXlJVBhWm4DHToMqmoLunNp1ra8+Kxl1me/hmhr7TI/nFQrCCOBikrRGbP KQj8YbP9iQCDxtdP+wsP0ay7Mv0HiTycqVVPENUq5idwP58YKv1KmvnODRcDW3wPHI1F fmQiW1DwdeJUzQ4WP+9kTuLueMU/DfIhGPbOEwOq7d5pRTrPEkgvE6A1EmiSzpZh4aFG 3N9A== 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 :references:in-reply-to:message-id:subject:cc:to:from:date :arc-authentication-results; bh=SvrEbmS5lL6IFzESMUIY+aldsKd297JWXPKXtunnXxM=; b=YaHhsnzdRFWh7Bid9B/gJNT2TsRukVA+hF9r5nkeO1gTelPp4ckjGtFdtbj6AaLLSW 0upir2Uq/z0SBCdvkw0Rn+yKN2htoRNiqaGZQ9T8Ij54CO+3ObBwVHrGqBKudclwtFAX htasK5kjZsfd1kPaEa+uJrEEjO5qkIqwyilS/XraPAd6M4V4vWra4AlcD4kxf0lwYioj 0YcJAWEm/BKG5CmaUKbCT1Gy/TXd3zfQfpyaDt7gEmDsgSpk9KZuvUIedTHY6TRjsuZ8 gd42641tyZF0e7BLFJ7+aQTvepqZe0IkKd8hmZqixsjVvC3xWem2akLb+GTIXZ0lGC72 WAOA== ARC-Authentication-Results: i=1; mx.google.com; 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 e3si239001pga.1.2018.02.08.09.53.36; Thu, 08 Feb 2018 09:53:52 -0800 (PST) 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; 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 S1752227AbeBHRwq (ORCPT + 99 others); Thu, 8 Feb 2018 12:52:46 -0500 Received: from 6.mo68.mail-out.ovh.net ([46.105.63.100]:34129 "EHLO 6.mo68.mail-out.ovh.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752059AbeBHRwp (ORCPT ); Thu, 8 Feb 2018 12:52:45 -0500 Received: from player711.ha.ovh.net (b9.ovh.net [213.186.33.59]) by mo68.mail-out.ovh.net (Postfix) with ESMTP id 36C04C4C6D for ; Thu, 8 Feb 2018 18:52:44 +0100 (CET) Received: from bahia.lan (deibp9eh1--blueice1n3.emea.ibm.com [195.212.29.165]) (Authenticated sender: groug@kaod.org) by player711.ha.ovh.net (Postfix) with ESMTPSA id 198A63800AF; Thu, 8 Feb 2018 18:52:36 +0100 (CET) Date: Thu, 8 Feb 2018 18:52:32 +0100 From: Greg Kurz To: v9fs-developer@lists.sourceforge.net, "Michael S. Tsirkin" Cc: Latchesar Ionkov , Eric Van Hensbergen , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Ron Minnich , "David S. Miller" Subject: Re: [V9fs-developer] [PATCH] 9p/trans_virtio: discard zero-length reply Message-ID: <20180208185232.46fca063@bahia.lan> In-Reply-To: <151665492548.14372.18325892476788349632.stgit@bahia.lan> References: <151665492548.14372.18325892476788349632.stgit@bahia.lan> X-Mailer: Claws Mail 3.15.1-dirty (GTK+ 2.24.31; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Ovh-Tracer-Id: 10262577651715447185 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedtfedrudekgddutdeiucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddm Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Ping ? Michael, Since this is virtio code and you have acked the QEMU part of the fix already, would you be kind enough to take this through your tree ? Cheers, -- Greg On Mon, 22 Jan 2018 22:02:05 +0100 Greg Kurz wrote: > When a 9p request is successfully flushed, the server is expected to just > mark it as used without sending a 9p reply (ie, without writing data into > the buffer). In this case, virtqueue_get_buf() will return len == 0 and > we must not report a REQ_STATUS_RCVD status to the client, otherwise the > client will erroneously assume the request has not been flushed. > > Signed-off-by: Greg Kurz > --- > net/9p/trans_virtio.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/net/9p/trans_virtio.c b/net/9p/trans_virtio.c > index 0845aad4ba51..ca08c72ef4de 100644 > --- a/net/9p/trans_virtio.c > +++ b/net/9p/trans_virtio.c > @@ -171,7 +171,8 @@ static void req_done(struct virtqueue *vq) > spin_unlock_irqrestore(&chan->lock, flags); > /* Wakeup if anyone waiting for VirtIO ring space. */ > wake_up(chan->vc_wq); > - p9_client_cb(chan->client, req, REQ_STATUS_RCVD); > + if (len) > + p9_client_cb(chan->client, req, REQ_STATUS_RCVD); > } > } > > > > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > V9fs-developer mailing list > V9fs-developer@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/v9fs-developer