Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp444213pxk; Wed, 23 Sep 2020 07:13:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyXMH1MZxqBeHawQt6FsGTHuwLg9wnMI/hRkSo30aJAl2C9TV+xmGJuPlmhBg6QXEse4uRp X-Received: by 2002:aa7:da16:: with SMTP id r22mr10241572eds.132.1600870422173; Wed, 23 Sep 2020 07:13:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600870422; cv=none; d=google.com; s=arc-20160816; b=EpZn0vtn1sEHsEix5Ox6bJ3SwsTxOUMS490Bajs/ebO41u6EdQmlQ6Fnunbzd8+TjT N47I+KVanIVlClRwVFUQn64ROQlrSaUL5dDou2DtXCkghpTUTQ2NdIGee/RfUiAAN9h0 UyoQoDpcxKB1lVB84zUZ9sxgYVEOULuuFe5KiO/YkP7in+GzsW4Am+cqGqj9/D9UW3j6 yiwvsRMj+dUT6KLP5oamz3tMcEigR+lZbBeP6UDAc9avQwmCCcOK8TLudGRRF/6BYG4Q Y6rt4tAxyNQ/w1Ibbyz9KNn42hPaPPPe/rDCPb7g+1cyDw+UFfX01wE03tQ+c0TQWQhk 8oTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from; bh=aSxnKJMq7ZvzdQxbD1BksuZfe9Bc1twFNuFFnsAYGRg=; b=G8UrnbUFXGHkI7lxDZHN4h5doAMvLKNfD4tB4QnLPX9olI0e9162lbt32kb5z+OgCk P9ZEiGRFkEAzw4O52vE/kwQAnAZ7u1cUlz4OyQLF2OkmHXrx4O21aXl9xsZeToloB7Ax 6JVTk4jjvpgQpQJKV4Di4fRwW+CVTGzXrgYKoLLbmJDad21ZoqVshVdIb2Li2ukNki+g 7+gB4tQXMiGf0GKOFhb2ljL2SmE4ZxDJWEROPl3pm4/EsgZcNcBVAcRHeQSQlN+vuzrd n+46/PNbPlP1cWMdrHmCDxKkDnUOeSjkjk7CJ/F8IYr9uV0tbEqvC/lqJLeFdUmcP5Ks u4oQ== 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 n6si7509ejx.165.2020.09.23.07.13.06; Wed, 23 Sep 2020 07:13:42 -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 S1726550AbgIWOMA (ORCPT + 99 others); Wed, 23 Sep 2020 10:12:00 -0400 Received: from foss.arm.com ([217.140.110.172]:47046 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726130AbgIWOMA (ORCPT ); Wed, 23 Sep 2020 10:12:00 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 8D00A113E; Wed, 23 Sep 2020 07:11:59 -0700 (PDT) Received: from entos-thunderx2-desktop.shanghai.arm.com (entos-thunderx2-desktop.shanghai.arm.com [10.169.212.215]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 927EA3F73B; Wed, 23 Sep 2020 07:11:56 -0700 (PDT) From: Jianyong Wu To: ericvh@gmail.com, lucho@ionkov.net, asmadeus@codewreck.org, qemu_oss@crudebyte.com Cc: groug@kaod.org, v9fs-developer@lists.sourceforge.net, linux-kernel@vger.kernel.org, justin.he@arm.com, jianyong.wu@arm.com Subject: [PATCH RFC v2 0/4] 9p: fix open-unlink-f*syscall bug. Date: Wed, 23 Sep 2020 22:11:42 +0800 Message-Id: <20200923141146.90046-1-jianyong.wu@arm.com> X-Mailer: git-send-email 2.17.1 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org open-unlink-f*syscall bug is well-known in 9p. We try to fix the bug in this patch set. I take Eric's and Greg's patches which constiute the 1/4 - 3/4 of this patch set as the main frame of the solution. In patch 4/4, I fix the fid race issue exists in Greg's patch. change log: v1 to v2: (1) in patch 4/4: do fid refcounter down in the clunk helper. (2) int patch 4/4: remove the enum value denoting from which of the inode or dentry fids are allcated. Eric Van Hensbergen (1): fs/9p: fix create-unlink-getattr idiom Greg Kurz (1): fs/9p: search open fids first Jianyong Wu (2): fs/9p: track open fids 9p: fix race issue in fid contention. fs/9p/fid.c | 69 ++++++++++++++++++++++++++++++++++++++--- fs/9p/fid.h | 11 ++++++- fs/9p/vfs_dentry.c | 2 ++ fs/9p/vfs_dir.c | 6 +++- fs/9p/vfs_file.c | 1 + fs/9p/vfs_inode.c | 47 ++++++++++++++++++++++------ fs/9p/vfs_inode_dotl.c | 35 +++++++++++++++++---- fs/9p/vfs_super.c | 1 + fs/9p/xattr.c | 16 ++++++++-- include/net/9p/client.h | 7 +++++ net/9p/client.c | 14 ++++++--- 11 files changed, 179 insertions(+), 30 deletions(-) -- 2.17.1