Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp1398301ybh; Sun, 19 Jul 2020 18:53:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwimygU6igVNLWoC5idxRlGUMhBRtj395WgR9gD4Jj7eJe7F/l4tdyEITYHHrdf7DOg3WU8 X-Received: by 2002:a17:906:3282:: with SMTP id 2mr18182927ejw.11.1595209992086; Sun, 19 Jul 2020 18:53:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595209992; cv=none; d=google.com; s=arc-20160816; b=bPSkcBCfOmOQPOr3MTeLOJYbIqG2SnUAoZ7hr/awkvD3a3raftvkD6+gO58ktrP5w9 R38OrlcLZBNYaf7AxowEBViPWhAc0qiVLjifa6XSwcXq+NsA7p0ITfyU817zGQ0s05AU AxMm43+AC5mP3Do7FoXEbYQHGqR690bnjBQcQFjPl89f6CK1/wYh7CY9EALidoRMLyWW tmImoYUE+cwSmy0fm6WehbzHzOoshOjTC/2zTl0AkCe/11bbHk4rDhPF/sFKsOTfrU8j xzHVGQUXcJR1xIhiqMk1gZQqbciSOVfuZ/u5w58ptta5ohbV53F3zwBWZ8YnjqZO47tp J5JA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=WHWOZzHdVYb0h8iJtAqDKFKZa1ZaV3F5QcVIWs9v/2k=; b=cdeh4HPZUqT74gEn5olUMpuHtBO9w2y13TttIeNbhAnrt138kQVzkXsZ1U4rHUSTH7 tGUhODXeS/ajcCG7YIuz4Mg+jjF0xNU5pMAeNRrZlEwvReIPP46KyQHQV4x47iUtr090 /HSp50wwHgWXjPBcXPUuYCPVhYVs6qelyElqqdyumG3IIZNRJqZgFYq1sI4QSj75SVpP jTyMo23rNNzN9o+yz/GRPo1mzzHK/H2xaeNX5KzvbgThSfKPJxselyN2hH8xylTdXM17 k86Oy+BXK8Kel59kj8skmpynT5d0AOzwqJo5n16KHXyRcrwCq+v5x2scq+y85WEvle+U pNvA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f20si9405379edx.189.2020.07.19.18.52.49; Sun, 19 Jul 2020 18:53:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726932AbgGTBw3 (ORCPT + 99 others); Sun, 19 Jul 2020 21:52:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52114 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726225AbgGTBw1 (ORCPT ); Sun, 19 Jul 2020 21:52:27 -0400 Received: from ZenIV.linux.org.uk (zeniv.linux.org.uk [IPv6:2002:c35c:fd02::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9C5D2C0619D2 for ; Sun, 19 Jul 2020 18:52:27 -0700 (PDT) Received: from viro by ZenIV.linux.org.uk with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1jxKyS-00GFpV-2E; Mon, 20 Jul 2020 01:52:12 +0000 Date: Mon, 20 Jul 2020 02:52:12 +0100 From: Al Viro To: Jianyong Wu Cc: ericvh@gmail.com, hch@lst.de, dhowells@redhat.com, lucho@ionkov.net, asmadeus@codewreck.org, v9fs-developer@lists.sourceforge.net, linux-kernel@vger.kernel.org, Kaly.Xin@arm.com, justin.he@arm.com, wei.chen@arm.com Subject: Re: [RFC PATCH 0/2] vfs:9p: fix open-unlink-fstat bug Message-ID: <20200720015212.GN2786714@ZenIV.linux.org.uk> References: <20200720014622.37364-1-jianyong.wu@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200720014622.37364-1-jianyong.wu@arm.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jul 20, 2020 at 09:46:20AM +0800, Jianyong Wu wrote: > how to reproduce: > in 9p guest: > > struct stat *statbuf; > int fd; > > fd = open("tmp", O_RDWR); > unlink("tmp"); > fstat(fd, statbuf); > > fstat will fail as "tmp" in 9p server side has been removed. 9p server > can't retrieve the file context as the guest has not passed it down. > so we should pass the file info down in 9p guest in getattr op. > it need add a new file member in "struct kstat" as "struct istat" does. Er... what struct istat?