From nobody Fri Sep 02 02:09:57 2022 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 4MJhFK3scSz4bRlh; Fri, 2 Sep 2022 02:09:57 +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 4MJhFK3HzMz3FN3; Fri, 2 Sep 2022 02:09:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1662084597; 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=Hk2Zwa1gbE1YvsY/UkLnqsCDYfiD61wfS+/7k3IXHIo=; b=HCCjLUPJ6UqjN99BFbRPPd6ogc3eyEDs0LiqzudOv1Jf3tXswOi9tYPtZH1qqcUQ4CtLgK 942ONTP27aos4aZm3zN+06YFKIcmvor5RFXoDQbskGyRtSxXBpSgp4aTssOK8i1YBLBIzQ QMuxDIpOl3As4A5sFLD2vo0Zu3GUpe3RQILX2ARyHCvaO1LnlnkKG6Ls3MOZ/vKfy5tvRe GE16vEoy1F0CEdyV5OKdc6LEQVIz45H5wd93suIvGXy4MGOVeA6NttnLiNkmLUPCeCezhO CAwjDNE5xgD6v0McJChj2XC2DROEwvKc1pw2RtcodDTXt3SxHN17imc6jWwszA== 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 4MJhFK26Lnzg4R; Fri, 2 Sep 2022 02:09:57 +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 28229vSw063794; Fri, 2 Sep 2022 02:09:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 28229vV7063793; Fri, 2 Sep 2022 02:09:57 GMT (envelope-from git) Date: Fri, 2 Sep 2022 02:09:57 GMT Message-Id: <202209020209.28229vV7063793@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: 761033d3aace - stable/13 - nfscl: Fix handling of a bad session slot (NFSv4.1/4.2) 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: 761033d3aace36eea1d82bbce86e06206b4cb17c Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1662084597; 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=Hk2Zwa1gbE1YvsY/UkLnqsCDYfiD61wfS+/7k3IXHIo=; b=dthcm05Wkkj0Gd1Zchbjc4GV6v6Z3PjQ3Ht4rTWf+R7xTEjaqW0AqrP8jKFwrlN5iGvBHn aRtJmEr0cSfScHc8H0e1NSCV71hXla3OsbSscbCrSRLPGT80TFJf/IeCUwCZhsCKUhpv9k hsNyNprnSycHWRHgOC7UBSRxQEZMf89BXfTtsbffrfAw2SQUDwf7Uao6TDmH4Ydnn9/FYA bnW6L9DWesditpSAeyuT3UQJJiYAoUWN6zQsU7m/acZiOG85Ck0BIQV47dogr0HliYnMB4 GcGCUSnM34ibLiDMq4tanJafnL2sh07Xn5KEzl3ru0iRcnGn1fx84DECF1202Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1662084597; a=rsa-sha256; cv=none; b=M2sjSo/BoKJ4SV9CN7oLPv4QqKpmIIZZCqe4DBnBvrNCYO75LkJI8X/1oOvoqZK8AamiiM yheFz/Blx6LVqPMKeqtOvvfN/mtPx8sYPMLjZAHkRP/bec599NtlT1Lp7d038+6Rvprii/ z6YwgbyoY3KtDcT8nVLi8FqHB8WOnZRwWIKVwiheVrnQpJJ4dtIOA7v+140qgoz363Djhe uAm1RQXXkzwLMv8LHBcc2B3mWn4XAE7fB03Gbk3E6ZyrZrr8Mg1F3nArcC5U6fj1TYNcjd GSrctUstoERMJxX7G3pYJ7YD4IzuC7jYlCMHAeeICUzpfXwGhk27SCSed2jURQ== 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=761033d3aace36eea1d82bbce86e06206b4cb17c commit 761033d3aace36eea1d82bbce86e06206b4cb17c Author: Rick Macklem AuthorDate: 2022-08-26 03:33:31 +0000 Commit: Rick Macklem CommitDate: 2022-09-02 02:07:05 +0000 nfscl: Fix handling of a bad session slot (NFSv4.1/4.2) When a session has been marked defunct by the server sending a NFSERR_BADSESSION reply to the NFSv4.1/4.2 client, nfsv4_sequencelookup() returns NFSERR_BADSESSION without actually assigning a session slot. Without this patch, newnfs_request() would erroneously free slot 0. This could result in the slot being reused prematurely, but most likely just generated a "freeing free slot!!" console message. This patch fixes the code to not do the erroneous freeing of the slot for this case. PR: 260011 (cherry picked from commit 2b612c9d3bb528551de9eaabbdbadae89a36ba8b) --- sys/fs/nfs/nfs_commonkrpc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/fs/nfs/nfs_commonkrpc.c b/sys/fs/nfs/nfs_commonkrpc.c index 81df586879c5..91ebd84fabd0 100644 --- a/sys/fs/nfs/nfs_commonkrpc.c +++ b/sys/fs/nfs/nfs_commonkrpc.c @@ -1080,12 +1080,12 @@ tryagain: } slot = nd->nd_slotid; } + freeslot = slot; } else if (slot != 0) { printf("newnfs_request: Bad " "session slot=%d\n", slot); slot = 0; } - freeslot = slot; if (retseq != sep->nfsess_slotseq[slot]) printf("retseq diff 0x%x\n", retseq);