From nobody Sun Aug 28 21:37:32 2022 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 4MG6Nr5fGpz4ZRDQ; Sun, 28 Aug 2022 21:37:32 +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 4MG6Nr5D9Kz3tQB; Sun, 28 Aug 2022 21:37:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1661722652; 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=MlyPTNR5qB26xU9bTL8e3P10bcP45iEouhMOCe5Fg4M=; b=MHrSbq/MNFPwxZ95s0nKGVwbSwK6diYHG/CWZ0+8Iio/ZfL52Y0oKfVvKU39LUbVjSMpcl uE4UTRyzjTq+DKgZumQ/qKYn0JBB35f8qFL1WsCY02TdPui7xE74sM+o+qTfxoPCwM7/cN dZpgcOcDT/tTz95RwXVgO03Et1M8v1hZMZ3s6Ay23NBy59smg5FJOP58yEdNlqO4Hikbht 14zkGxt6JMeV9xiixdSykDgSCkZYbsS1IYrLjiroU4wWnhoq9jR0wk2rat99RuJAnnJP4q G9bvAep24rJg+6QBqurwMhYoaCpFifGw43Oqa9eIrBkSabMCOJZLFzOLENkGYg== 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 4MG6Nr4Fqjz1CSm; Sun, 28 Aug 2022 21:37:32 +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 27SLbWqi059600; Sun, 28 Aug 2022 21:37:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 27SLbWYp059599; Sun, 28 Aug 2022 21:37:32 GMT (envelope-from git) Date: Sun, 28 Aug 2022 21:37:32 GMT Message-Id: <202208282137.27SLbWYp059599@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: 117cea02a4dc - main - nfscl: Fix setup of Sequence when all slots marked bad 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: 117cea02a4dcd5757d1ed469a14110f4670dedea Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1661722652; 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=MlyPTNR5qB26xU9bTL8e3P10bcP45iEouhMOCe5Fg4M=; b=q95qmXIfBujvEFHqEmtCuo2cqF0aJWoS95tOz6Ig5dvGI2PLN1H49Bhpzty1tJwSnSO1Y0 Gwtz/ywdH5cdQhXq4M2ddF8dBasBfOx45LmyGB1/Sada8Ms6tqhr77X5sbEsVcXlWXYppp zxUO1IkB82UBkAq+IdeqQCvi7NpnvZTtNU9n5PlnS6j9zxX0w2IpwA42y7leqUpZ+OVgc3 JMJOo6yEinFXuO+EYXviUxihAsrAzRAt0U+o9q0c1vbjD+uUwg2ZsuKkMc+IxaK3DO39Do 69w5R8Gdq68Aa87+G70qP97jWHtIVb9a+J9voqLdZbgVggwtL9mDK+Kpm09xDw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1661722652; a=rsa-sha256; cv=none; b=cLVDC3UmkMq9ijMY0XVJEqQZlxcqihBGL2KRLXQ9VYv7RStn59X437Yg4ecqaPYyCJPXlK iGzP58tjQhDprUpt038MBu2MDJka5VuvRfC7bOeK+qhDVPqmHry//8fEWDref+skmVCdG0 QsnfemEXoEaLQoBLQnenwP+KM03vrCH+2p3kNGmRpxSzn6TJmz6zBhSjPTn3ZmXDaNrpU9 bZU8jYu43r1VqHUQSwNYBH0juqbJSEl5yzngdwoXGU7UZWUQs1wr7j459ym+2Z9IAOf7lf tj6wwHbCyxvjrTqbqqSReUhjngKoVXmbJ0TWSiHwQASyhCoVSrbBkJAX+OsscA== 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=117cea02a4dcd5757d1ed469a14110f4670dedea commit 117cea02a4dcd5757d1ed469a14110f4670dedea Author: Rick Macklem AuthorDate: 2022-08-28 21:36:45 +0000 Commit: Rick Macklem CommitDate: 2022-08-28 21:36:45 +0000 nfscl: Fix setup of Sequence when all slots marked bad Commit 40ada74ee1da modified the NFSv4.1/4.2 client so that it would issue a DestroySession to the server when all session slots are marked bad. Once this is done, the Sequence operation should get a NFSERR_BADSESSION reply from the server. Without this patch, the code was setting ND_HASSLOTID when, in fact, there was no slot marked in use by nfsv4_sequencelookup(). This would result in the code freeing a slot not in use. The effect of this was minimal, since the session was already destroyed. This patch fixes the code so that it does not set ND_HASSLOTID for this case. MFC after: 2 weeks --- sys/fs/nfs/nfs_commonsubs.c | 1 - 1 file changed, 1 deletion(-) diff --git a/sys/fs/nfs/nfs_commonsubs.c b/sys/fs/nfs/nfs_commonsubs.c index 6dd1a3e4c579..06b0354e06a7 100644 --- a/sys/fs/nfs/nfs_commonsubs.c +++ b/sys/fs/nfs/nfs_commonsubs.c @@ -4787,7 +4787,6 @@ nfsv4_setsequence(struct nfsmount *nmp, struct nfsrv_descript *nd, if (error == NFSERR_SEQMISORDERED) { /* If all slots are bad, Destroy the session. */ nfsrpc_destroysession(nmp, sep, cred, curthread); - error = 0; } } else error = nfsv4_sequencelookup(nmp, sep, &slotpos, &maxslot,