Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp904489imw; Thu, 14 Jul 2022 13:07:47 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sFrpx5+F2ZqIT25xYqHO1m8QEhTs5J+LImeMXzsw3pXFtXnoYPQbuerMPX/DHZX8wyKDwU X-Received: by 2002:a17:906:cc11:b0:72b:458e:5d45 with SMTP id ml17-20020a170906cc1100b0072b458e5d45mr10294503ejb.589.1657829267069; Thu, 14 Jul 2022 13:07:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657829267; cv=none; d=google.com; s=arc-20160816; b=jXUM8fujADdkjHYpjYCn6yWwa43M+56fV6vbvL2n2xc3SDc19zp38O0gAc/hOl1HXE YBwSlZ6oZSYaVw6SSC2bS6xlyPhStJeK4STJdDr6E8w08FDCAn9xxHMjPNOU9bjdWucw k2Ur7HYv4099lOma5KQqb8FsYaziCrkpPLS6JEaXTw3d8zt6O4rorSI/RRzpfM6EA6em 1vBWvKYpFyr02gOt2YGJySrN/NR2XgnnEFTdbjup/Vndox0ygz6PO4s3H+0NW0poNPVc eNmv5BHwaFVy5Ox95MwB3xDslJe4LNrB6mljbtd53286zfXiBLB6XxXeLbFAz8Kf+rZD 9KRA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=T0y+ZaJmhHeqx55ndVlGRNW5zj7y5qJr2FdritMtPDk=; b=UZBMhc02NNgj51uJLlX5lIPr0ZM4E1wo6hMic9EiBGDg6BDmU/X0qhRkgT4micTMPr 6LL2bO2T6jlSQqlnOfP1u8IBWfr5Hkm670nIUny0dIevfMB5s2QBwxbT5N76vnunts0F LcIh93H8ysQMhVFH5Ie9cb962dv1padQpsMMn5ByhEv3WNwUxGIUnYsGIOOhfeGtKh23 58AdwRgoktWzmb41PARzsrXwI7PqLHAg5oZHjlS+k6vp6yw1Sw1ODbQyyDD/nODyMizZ M57jLVuWxXagzQPvQTy7G/ytLgQc14YnjLKFW85HjeZmp0YYtj2njuRDRTLt9DHuEXFP VNDQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=svKboFdO; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y14-20020a50bb0e000000b0043577827670si3276642ede.354.2022.07.14.13.06.16; Thu, 14 Jul 2022 13:07:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=svKboFdO; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239720AbiGNUEk (ORCPT + 99 others); Thu, 14 Jul 2022 16:04:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58852 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238087AbiGNUEi (ORCPT ); Thu, 14 Jul 2022 16:04:38 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5BFFF46D87 for ; Thu, 14 Jul 2022 13:04:37 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id B92026221B for ; Thu, 14 Jul 2022 20:04:36 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BAA59C34114; Thu, 14 Jul 2022 20:04:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1657829076; bh=9Tf4yhzPdnMNP4EqbK9j4rFDRMn4zNtDaFY6ndl4gxo=; h=From:To:Cc:Subject:Date:From; b=svKboFdOjVUe0hg9b8il5/Oh/3vjk7IG2jkqCuNhCpL0VgFQMW0H3FlSjMo5FHITS JDlsrzbbOX/SfdTbbd05mQ0leQojA7zQov4TPVSBPHmiL25bTXSvofmVg023S2sj3f KRXUjTWr5+3zuyeDcIMUNVz3rTVQrxpDgINka1upIrYDUfwZTJEh492yd15arjtFUA nqKB410rkTx2RIcuNS3Z/c2G7xDDSbpsOUzlhjuQqnJMPfIACx9Nfyjq9FbmiVw969 8kmQ3RNp3iw2p3EprziLdptIT2sBuAmwW5LSEMhIGvHGEkPkQRgs/VISKOlTfHkndC B98CSdjDR0thA== From: Jeff Layton To: chuck.lever@oracle.com Cc: neilb@suse.de, linux-nfs@vger.kernel.org Subject: [PATCH 0/2] nfsd: close potential race between open and delegation Date: Thu, 14 Jul 2022 16:04:32 -0400 Message-Id: <20220714200434.161818-1-jlayton@kernel.org> X-Mailer: git-send-email 2.36.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org This is a respin of the patchset that I sent earlier today. I hit a deadlock with that one because of the ambiguous locking. This series is based on top of Neil's set entitled: [PATCH 0/8] NFSD: clean up locking. His patchset makes the locking in the nfsd4_open codepath much more consistent, and this becomes a lot simpler to fix. Without that set however, the state of the parent's i_rwsem is unclear after nfsd_lookup is called, and I don't see a way to determine it reliably. Jeff Layton (2): nfsd: drop fh argument from alloc_init_deleg nfsd: vet the opened dentry after setting a delegation fs/nfsd/nfs4state.c | 54 +++++++++++++++++++++++++++++++++++++-------- 1 file changed, 45 insertions(+), 9 deletions(-) -- 2.36.1