From nobody Wed Dec 1 21:50:00 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 D5F5218B4D8C; Wed, 1 Dec 2021 21:50:00 +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 4J4CRr35Nbz3Qfx; Wed, 1 Dec 2021 21:50: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 42C3A119DA; Wed, 1 Dec 2021 21:50: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 1B1Lo0tQ087443; Wed, 1 Dec 2021 21:50:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1B1Lo0ex087431; Wed, 1 Dec 2021 21:50:00 GMT (envelope-from git) Date: Wed, 1 Dec 2021 21:50:00 GMT Message-Id: <202112012150.1B1Lo0ex087431@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: 33d0be8a923a - main - nfsd: Do not try to cache a reply for NFSERR_BADSLOT 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: 33d0be8a923a840ec0724d50815890c5ffe0e884 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638395400; 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=5zJtIZ5bJAoMjjdWMBXI4E6k+WBwNHbV0DdpCX49dMw=; b=YhCfobShpwujmS1dshwIP2WR2GeSI6s8+HP+hEmrDLJUzh95k7VKup9pdbylFu1xTT8l9h qFITLhERK3LRcK9Ptq0jwmp2ZNHCCJDSReWXX5i/tLLDHTr71u2v/C5QK+zJhtYoIOqXSy E5KyeXmDs0ogDoqI/IhpccYAlwQPJW3C6vpYelSwlV6wZ06xiX1VFzkvoAWIDCGMBbZdSj ee3OoSYE6y7JFURDCOYEp5GpJonHXa7wbIP1mOzM2wNjIFDZHVEFYO9p8UKszIglCIbp37 O5GtyHU6iAkgnEBJjxC95cbZiaSCrRihFqBZDikL+ysQhk07MqWMuITOtUbBfw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638395400; a=rsa-sha256; cv=none; b=lVfq6jDbNIaxcpBFmaYokpLqwdEVVSGBw+Nuq1XJDfVyGzipSm7qkvQjmG933ngLt1769E K1xtjc1LJUPJsaM+UhbrZt5ABOxAwLKgZOATnRFF+UphPI+mahKzYkOeeUfeXm1EyXRltp EbNKeBfhAse9piHqG9nRL+LbKDjTStxQ54MMnEZfLTvP96o18HBUxCHy/5yHS4J9gRuv2i vZ5sRXTrakCqBG+AZPzv24jaE7nScH6Yotbp5r4g0bb/qo2uDvVllpd9QSJyENzQD214OK 1JJNP2aP2dtkAR+xxtDOQH5UKGF2/K5rKbYdyc1AzubbKrWaAvL7LbnDHI63qw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=33d0be8a923a840ec0724d50815890c5ffe0e884 commit 33d0be8a923a840ec0724d50815890c5ffe0e884 Author: Rick Macklem AuthorDate: 2021-12-01 21:46:41 +0000 Commit: Rick Macklem CommitDate: 2021-12-01 21:46:41 +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. Reported by: rtm@lcs.mit.edu Tested by: rtm@lcs.mit.edu PR: 260076 MFC after: 2 weeks --- 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 445ef2ad9e2b..e5ccbfe7fc37 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);