From nobody Fri Sep 16 22:22:35 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 4MTpV410x8z4cGfX; Fri, 16 Sep 2022 22:22:36 +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 4MTpV40X8mz3jLy; Fri, 16 Sep 2022 22:22:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1663366956; 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=pdWbqWTYbr0yEDKgBbsJf5r7va9scwMJapipnvu747Y=; b=QKpJ+lYsGnOm68givDQpXj/iF26ieJaVFrS1FVC1eQagpDG4obrf1jKtpn08Yqxqp6p+Bn 0oAs6THKaSn67T2s+zF1HnZQkpPmaf6j+NL3hGil6LzbeITJTEtqqJyE6tZ+zy01Lju8y2 QX4oBMH7vHL/SF6E3GQ/9l4gpS8J8iWJ29hFdJYF2PyyeBZw0dnrhRdZ8KCu9COYJR0uHh NybnGBlIIE5TIUjPa9PCr9GjWNRhAnUFjc57xZPTUDPQZohowSs7Tmr3XC6S/MTa3lKSob opJwQUZbXaM6lwI3nPe1BsWtURQ2bzMUNYBcjzirY21xKOV2z+5zXgXtmZ3PAw== 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 4MTpV36jmRzWCN; Fri, 16 Sep 2022 22:22:35 +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 28GMMZp8074978; Fri, 16 Sep 2022 22:22:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 28GMMZpk074977; Fri, 16 Sep 2022 22:22:35 GMT (envelope-from git) Date: Fri, 16 Sep 2022 22:22:35 GMT Message-Id: <202209162222.28GMMZpk074977@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: 74cf968007f6 - stable/13 - nfscl: Fix setup of Sequence when all slots marked bad 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: 74cf968007f61d74592e08f6f67911eb7a6adf20 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1663366956; 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=pdWbqWTYbr0yEDKgBbsJf5r7va9scwMJapipnvu747Y=; b=kgozr14TynP9KgdmfOcC3QADRdcAVLHS35A+HMXqI3ZBOYmH0aydNuQPM5O+QG3cVHvkAl 9+zJweGStu7QtFaM4OegN4tvnUSgo/6GJJRkN3p22RkViz2aXbD71mAMw55LaHVCW1C9M3 DC4gRqY06uFEGAFN09UftqA4oZg+OZukjWfyyNQJ52uwYHneq0rRYDVnfEM53R0e2jfayP hFJptKiLq0T+Xxt23fUVPiwQN1G+50r2tO2RIx5sAK9u0jh07LmF3KRzOxLSX8W483qzoy gKOJ+ks8oUctIsLD6M6z8RJr/ccdNw2CfR/wjOnWcHtxecQ1lmtYhRF+1YuOcw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1663366956; a=rsa-sha256; cv=none; b=hQQqIHGjMT9Fz0Ewph3lwPx2/tZz0LAGG+ULRdcbJT6HF+F7CTQ3bWVA0BZUy0c37rhX9e 9ra7xmZ15/GUTLpwDF+2oKwGyZZm+Y9OzOh8VCms/GKwx3T/Id92IkybG/ZkVJn6SQPNYZ Jd/LNlPeKhSvvdzrQJdzGIR3AputKk44fVZ6k7jsWMRRtsKElUUrYPhydyaWGwStfNaP2M jDrLuMY6UFdMd2W/LMsZJ7REy88f1EBq281L9AbGQVZCHcw/riBiRBlrmQRPj2edRj/3fZ eGWxTRLH54QBJVfFp8QhF5BFhfJVsxA1DzFEATSJ+B6kt9PIbjaC6mgExJjH8A== 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=74cf968007f61d74592e08f6f67911eb7a6adf20 commit 74cf968007f61d74592e08f6f67911eb7a6adf20 Author: Rick Macklem AuthorDate: 2022-08-28 21:36:45 +0000 Commit: Rick Macklem CommitDate: 2022-09-16 22:19:33 +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. (cherry picked from commit 117cea02a4dcd5757d1ed469a14110f4670dedea) --- 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 72482784a0a0..9057689a36e4 100644 --- a/sys/fs/nfs/nfs_commonsubs.c +++ b/sys/fs/nfs/nfs_commonsubs.c @@ -4791,7 +4791,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,