From nobody Tue Oct 26 02:14:40 2021 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 3CAB318202E4; Tue, 26 Oct 2021 02:14:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Hdb4J6FCTz3KcH; Tue, 26 Oct 2021 02:14:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B6C3C14512; Tue, 26 Oct 2021 02:14:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 19Q2Eeo6013631; Tue, 26 Oct 2021 02:14:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 19Q2EeYR013630; Tue, 26 Oct 2021 02:14:40 GMT (envelope-from git) Date: Tue, 26 Oct 2021 02:14:40 GMT Message-Id: <202110260214.19Q2EeYR013630@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Rick Macklem Subject: git: 23024f004a4c - main - nfscl: Add a missing delegation lock release List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rmacklem X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 23024f004a4c5659bfcb0b08fac2211ae925ee58 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=23024f004a4c5659bfcb0b08fac2211ae925ee58 commit 23024f004a4c5659bfcb0b08fac2211ae925ee58 Author: Rick Macklem AuthorDate: 2021-10-26 02:09:14 +0000 Commit: Rick Macklem CommitDate: 2021-10-26 02:11:45 +0000 nfscl: Add a missing delegation lock release There was a case in nfscl_doiods() where the function would return without releasing the delegation shared lock, if it was aquired by the call to nfscl_getstateid(). This patch adds that release. I have never observed a failure due to this missing release, so I do not know if it ever happens in practice. However, since the pNFS client is not yet heavily used, it might be the case. Found by code inspection during a recent NFSv4 IETF working group testing event. MFC after: 2 week --- sys/fs/nfsclient/nfs_clrpcops.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/fs/nfsclient/nfs_clrpcops.c b/sys/fs/nfsclient/nfs_clrpcops.c index 35ce9be88405..dec70dc2ac06 100644 --- a/sys/fs/nfsclient/nfs_clrpcops.c +++ b/sys/fs/nfsclient/nfs_clrpcops.c @@ -6045,6 +6045,8 @@ nfscl_doiods(vnode_t vp, struct uio *uiop, int *iomode, int *must_commit, if (layp == NULL || rflp == NULL) { if (recalled != 0) { NFSFREECRED(newcred); + if (lckp != NULL) + nfscl_lockderef(lckp); nfscl_relref(nmp); return (EIO); }