From nobody Sun Dec 17 20:31:36 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 4StZP50khvz54CHt; Sun, 17 Dec 2023 20:31:37 +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 4StZP41q23z4Djj; Sun, 17 Dec 2023 20:31:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702845096; 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=khKTkKm1lmMGxSYfacfiN8G4Mk2mY/APZ44KlY2o7/I=; b=orZv6gDhcMCVmBtp8iTGIQv3L3HlTQenz/n8BgQ3W3jka3ccUT0D9BxyIK8JVQxDGy2pTL I1pSRVlM8fFr59+1cy4J0cXbv+QxDROH7HrGCZp46qb6TxqBZ3E6x5oTfHB+2WaU9uX68t IhZu38xq2JsVnvz3czh194W43PTGIRzIT8jCbnijN0S4g60GxzCF2G3WDd07sAOdUhDRcL Bp0nHsUUMvQ1ppOXriyW4s/4GjeIzJnup8F+pd5QehlL6jE7TNFtlSgSBGZtLz0IDB87jG 0w3vVVTKTeQ7R5wYq8/A+PC/1tmyaC0gdDCNN4pFCnnjoi68bJgAm5CfiPXOMg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702845096; a=rsa-sha256; cv=none; b=Gyvmq3Jli3yGOwb/rO4/q61xa1LpbLFlBMBWD3HY8PD24GzLHPKsipBVZDVgYThkC/mO2W UpkLsUy7rQOAmmsh/OaUXr+wK5g8GC6/L6SFfSfEj+p4Im0Dz/m/3gV836QB7/BFxZE/N7 MkD9/HU5xaG/2VMXIlLx9aaFttIHXjgO44xUVopNx+M/PtQB4rU6qbwrtDHo6MxJKv9f7h OwpBmlUMnvLCZiXTYgbOhvZtzghNodDPmus3+fb9d8IJVtZJdYlyatF8EmrwSIg154cHkP TYRmC8jACxhUi4LQiFJj0zdIIe4RAoE2OQ1/E4exq5Hx0cKd8RXP1MAqnibrIQ== 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=1702845096; 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=khKTkKm1lmMGxSYfacfiN8G4Mk2mY/APZ44KlY2o7/I=; b=aes4rSiJXZK4r41yguLM6cpBTqkaxGom4oKO1mjdgfUAQtlT6LBO/R6NAkkXykcKv01uEm vMnn7xDVfaEUqrwPFZirJUEYobLs4ljwufqY4CYyS8enOg3FEm4qOxYRN5ENDpcYVXO0Yp D+GJQIUrD35ikGkU98Ulmo7g8mRFtJiAqsBDOl3XvZsEeQf2IWrQLqkdeNnyO55iqTwops JI8m+sTMNABilSN6e0GOfnctCs8mXfJxbx7Dyj6KSIeFVJSq77CR/G/cE8d2ADdEFmJy1n hZVVMNViX/AXPQn2KnFL1gGyjXq26gxvoF6drbOX6WINgpMRnswLMo+g3wwpaw== 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 4StZP40w8Zzs2j; Sun, 17 Dec 2023 20:31:36 +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 3BHKVagl004625; Sun, 17 Dec 2023 20:31:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BHKVaFc004623; Sun, 17 Dec 2023 20:31:36 GMT (envelope-from git) Date: Sun, 17 Dec 2023 20:31:36 GMT Message-Id: <202312172031.3BHKVaFc004623@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: 71ccbf895655 - stable/14 - 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/14 X-Git-Reftype: branch X-Git-Commit: 71ccbf8956556962e6199ca277afe16f76a9a1fc Auto-Submitted: auto-generated The branch stable/14 has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=71ccbf8956556962e6199ca277afe16f76a9a1fc commit 71ccbf8956556962e6199ca277afe16f76a9a1fc Author: Rick Macklem AuthorDate: 2023-12-03 23:31:01 +0000 Commit: Rick Macklem CommitDate: 2023-12-17 20:30:18 +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 c986b3927f1b..42264c947f32 100644 --- a/sys/fs/nfsclient/nfs_clrpcops.c +++ b/sys/fs/nfsclient/nfs_clrpcops.c @@ -3006,7 +3006,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