From nobody Sun Dec 17 21:02:33 2023 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 4Stb4n5Tzlz54FCs; Sun, 17 Dec 2023 21:02:33 +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 4Stb4n52wGz3fdL; Sun, 17 Dec 2023 21:02:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702846953; 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=8meHOMX0J6Kip8HC8Wv9VmfjBp5hBEq0oxKL2iNFL94=; b=BLokxpVdfgSBCp92Xf/n5T6mUfcEyQQI+PWKE/kevOG6POW28wRV+zloq9bPqXaA3A6qyz UigwwGM9yFEekiSdqb/yiBybqJdAvdftVg3foYnGwwNt7HX/g1+SMBh4Vf58WR99GWJgI1 vvZWIyS/g405mwvVtfE5uXlFKP4J9dlOd/2MGPNpj+69yvzUWsDpVObUnl9GSSXIead+li Xwz5H5ZY+66SIKCDcj8EmTiJkQjqrrun531DmefB7JzebpxB4Jd7vJpRMAGryfHdbIO48g LV0eWsbGSU1LMq7m3z1+MVM7FnzShouu3H2x1KH9hThWY6XoeqybruPDBoEeAQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702846953; a=rsa-sha256; cv=none; b=fiBSQTNXh6E8aWfXgWsLzcPiyemlLFd7QRUOjfN+o4VsJu6gwuXwaX4OInK+TYRGxOcnBA vVXP4sIKozPoXx65jivcYWcKURYVOB9LG2Xr3Gbcr8P/mA0MjV4hlu2MqCuLsDDOgWmrL7 KuvJuYonX0Zq8PAJ30UjUaWxduYcjAmY5LHkLgJmc2mzhGWYocuUEJDwYAGw+ZpJlaEOG4 4ACH2VayRz86gDEo1a5NgYWISQwF7Bd+u2er2E3gbPcBy9F1+CNmq9CEOrbcyo2x+wVXbF GjBjzRo731Z0gUI86l3fuWC7BDP6Feo//UEUK8dtg6N9uRUkpcNtRysryWewLQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702846953; 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=8meHOMX0J6Kip8HC8Wv9VmfjBp5hBEq0oxKL2iNFL94=; b=NEpVjMQnFcLiL79wjtZ0sBu9/utklMlyYl9vhgGyWfGR/KjMntL6/c3swtMvd1hh2Bcv/O e88ka0zzoU3S/L3KEfyrM0Z9Rg3UKC+xCup0EoSiDWEgeeZfU7E0s48QEXgTnZuznR+Zzc U0/SdDz+ooc0VNBQ5Q1pg+8mz2ZJnkb412Xb5XiPhld1IVrQEGx9WV4ik4UPaOlsPasGpk Tyr4Fk0Hal24G7u9QwRzcUo257OtR5q2+pAcMpkCUAJ6LoKMdFqAYilhyzwbJd8z/gVvqW IeJiFAUGjnDnbLvCBRq1o1Vz0BFpuW92mYajgIkdK+UbC239h3GEYqbJBpRiaA== 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 4Stb4n48MszshX; Sun, 17 Dec 2023 21:02:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3BHL2XoX060453; Sun, 17 Dec 2023 21:02:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BHL2XVX060450; Sun, 17 Dec 2023 21:02:33 GMT (envelope-from git) Date: Sun, 17 Dec 2023 21:02:33 GMT Message-Id: <202312172102.3BHL2XVX060450@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: c5e3beac7b80 - stable/13 - nfscl: Fix processing of a rare Rename reply case 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: c5e3beac7b80483b41492e021bbd43242528424e Auto-Submitted: auto-generated The branch stable/13 has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=c5e3beac7b80483b41492e021bbd43242528424e commit c5e3beac7b80483b41492e021bbd43242528424e Author: Rick Macklem AuthorDate: 2023-12-03 23:31:01 +0000 Commit: Rick Macklem CommitDate: 2023-12-17 21:01:34 +0000 nfscl: Fix processing of a rare Rename reply case When delegations are enabled (they are not by default in the FreeBSD NFSv4 server), rename will check for and return delegations. If the second of these DelegReturn operations were to fail (they rarely do), then the code would not retry the rename with returning delegations, as it is intended to do. The patch fixes the problem, since the DelegReturn reply status is the second iteration of the loop and not the first iteration. As noted, this bug would have rarely manifested a problem, since DelegReturn operations do not normally fail. (cherry picked from commit 6aded1e6b2e5549120031032e1c7f8b002882327) --- sys/fs/nfsclient/nfs_clrpcops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/fs/nfsclient/nfs_clrpcops.c b/sys/fs/nfsclient/nfs_clrpcops.c index 63b9f7755fd3..41c397100497 100644 --- a/sys/fs/nfsclient/nfs_clrpcops.c +++ b/sys/fs/nfsclient/nfs_clrpcops.c @@ -2719,7 +2719,7 @@ tryagain: ND_NFSV4) { NFSM_DISSECT(tl, u_int32_t *, 2 * NFSX_UNSIGNED); if (*(tl + 1)) { - if (i == 0 && ret > 1) { + if (i == 1 && ret > 1) { /* * If the Delegreturn failed, try again * without it. The server will Recall, as