From nobody Wed Dec 15 01:38:00 2021 X-Original-To: dev-commits-src-all@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 93BC518E0E3A; Wed, 15 Dec 2021 01:38:01 +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 4JDHtw5KMpz3tRt; Wed, 15 Dec 2021 01:38:00 +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 87F13137A2; Wed, 15 Dec 2021 01:38:00 +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 1BF1c0NI004875; Wed, 15 Dec 2021 01:38:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1BF1c062004874; Wed, 15 Dec 2021 01:38:00 GMT (envelope-from git) Date: Wed, 15 Dec 2021 01:38:00 GMT Message-Id: <202112150138.1BF1c062004874@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Rick Macklem Subject: git: 6a6b08d4646e - stable/13 - nfsd: Do not try to cache a reply for NFSERR_BADSLOT List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/stable/13 X-Git-Reftype: branch X-Git-Commit: 6a6b08d4646e109222a995c8432c025266b6101a Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1639532281; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GC0ZrKoKSOpSFAZ7/zYxW7DMiMeGZivjYn+xS3plrBk=; b=HvdXG7f+yFqabE9L6ILKTnQ3DazvfY3wwnKOpxsY/VMXSWAoYELq84d7bQm0QZXMiWrGeO tUtOLb0NypzLn+ljvXqmg4sAMau4k3j7j2xtHs1coLeI0yHKPRp3PV2jA1Pg6SG/ENLXLr KJ0r/9fkZ4Q1/ST26Sf3QhvyJRewtd0H4A9UpjjSwQ0KPHgmpqRdqhCXWDsbJ+i8Wh7P3Z WarhQuoW80VwNrfj2Ua7HxznvuqiZW0gdP19WZIqsepzS/iO3KFv7q+zoAT/iCNpLm26Bp C8LKtXD4f5UgOF6f2xlC/LEP1PknoUJZXrPkMUiQ0cT9HPdgvQHg2fME3PX2iA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1639532281; a=rsa-sha256; cv=none; b=cFBqN8KGUOMgcglbttPFstnCk2/53kwwcBMrEdFrePayBOGf42CVK92XjcbgGTxzJS2vap jXwKqNvYf6BCI8xRUvDH5AM5hFuG8Kya54Ys3qihONd1qkvWTYIQnyfKNIqNCp3HqoMTsR q0PuLx+6AWEGIKtczDV9tVOPB6KFNNsrNWxcuiIzKehjQui5VFwV0Ion/i/i4ujqu0D5EO QrtOprJMmekZgNsOkyNcx425YXjgcGOnh8D+ETqfOFcQmlBKNyCHQ++S9jtz1FbiFRq6La fuHrFG53UaRP0RqtEnTtfdY5lf0Ai/LyHHnRaclS2O8+Uhuo77llwTJ6L/Yb8w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=6a6b08d4646e109222a995c8432c025266b6101a commit 6a6b08d4646e109222a995c8432c025266b6101a Author: Rick Macklem AuthorDate: 2021-12-01 21:46:41 +0000 Commit: Rick Macklem CommitDate: 2021-12-15 01:34:05 +0000 nfsd: Do not try to cache a reply for NFSERR_BADSLOT When nfsrv_checksequence() replies NFSERR_BADSLOT, the value of nd_slotid is not valid. As such, the reply cannot be cached in the session. Do not set ND_HASSEQUENCE for this case. PR: 260076 (cherry picked from commit 33d0be8a923a840ec0724d50815890c5ffe0e884) --- sys/fs/nfsserver/nfs_nfsdserv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/fs/nfsserver/nfs_nfsdserv.c b/sys/fs/nfsserver/nfs_nfsdserv.c index 517741a45288..438e5b00c8d0 100644 --- a/sys/fs/nfsserver/nfs_nfsdserv.c +++ b/sys/fs/nfsserver/nfs_nfsdserv.c @@ -4566,9 +4566,10 @@ nfsrvd_sequence(struct nfsrv_descript *nd, __unused int isdgram, cache_this = 1; else cache_this = 0; - nd->nd_flag |= ND_HASSEQUENCE; nd->nd_repstat = nfsrv_checksequence(nd, sequenceid, &highest_slotid, &target_highest_slotid, cache_this, &sflags, p); + if (nd->nd_repstat != NFSERR_BADSLOT) + nd->nd_flag |= ND_HASSEQUENCE; if (nd->nd_repstat == 0) { NFSM_BUILD(tl, uint32_t *, NFSX_V4SESSIONID); NFSBCOPY(nd->nd_sessionid, tl, NFSX_V4SESSIONID);