From nobody Fri May 30 20:36:37 2025 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 4b8FQG1cjvz5wsd9; Fri, 30 May 2025 20:36:38 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4b8FQF6KVzz3d7Q; Fri, 30 May 2025 20:36:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1748637397; 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=CXH1Wam1KzGx6+UDgEH/nHGUAzfHnBSBzO8XUhH5JaU=; b=HROefXb5oevZYjYmpdNLl4/fd1vY/G11YzMHmZsOU5tgyGbFbbOZHvo/uwv5y47cpA7hVn w5m3W+T/iaTDdMAhRPCiEAkpXl4FreONr7LXEuxq+OQkLV4NEvwmMCybVllGfDOmoauci0 kZ0Y3XJIcOd1f73xtBKJQ18UL5x362qUmhmZ4TUYcIeEZd8CgHkgCSLNN+EK+l8nosxFim eCxF2Csdhw/MhHjpdKwzo/1hywUAJdWy+GxVTn99tCPvy0yP+GZUzCg4i5OVXoNB7PPjfZ 5AfJfDg7O2Ctz2QnxTRZmRfzeqJahO9tRKqaZa7Syv22aqCrtPr+291uwJKMdw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1748637397; a=rsa-sha256; cv=none; b=VeGI+Dd4xfdUBk5SSAJewbxUGqK1u7t/XMNqqEHbMj2snrTIR7l69tsgXhm0v5JigGUpYd ujbOs/tJ440GR2cHoYVMFuov44QRP+eY7wVS6LT5PRXMPq8Hx0pNnIvlvqhz8jG28ik9BF ms1OC1mIKhEf0Zzn6XyS2VrzyPuVCxB8wnjAZgRN7XrK+gb5oHlDGqp5NhZTTNy1EFm68b spsaLRpdstRTwGqdzF7RNnKQygR99yIvNa01xPA84jvfjIXVYNVR3mfsZR9b0LdJrWaW7G H6uHupvojKSqhP9vh9tP407se38gT4zHU8rnKLDKa8CuZfEuHLwNQthmABt0FA== 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=1748637397; 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=CXH1Wam1KzGx6+UDgEH/nHGUAzfHnBSBzO8XUhH5JaU=; b=PlhWn3gupd+u3hNvs4xHiJUL0yP2hQOXGtz6mQ2kzws8ch52qphwt6GRRJTe2LOiefAWNj 8ZXJNxdbJgujkqLpnuWgKo66jY0noxNBxI95mMxpwiycZzx1B5vEHu7+WqhMlFQTNY4LFc oaBeOa5mlu/Yo7GaxE94EhzHriWOhRNgLAFFKP4zCmigXxLSbLsTdLJmHuToLGOwhifJEc wBUxuVgHgY8645yeFPHleY/8MOMkyB+aGEUWJeO5A6jnbIjhwsMpwovDtxWexZNz9C8z9f kn9i589/ogXqMq2d4gxNOJ8eapu7oRdoR9uQns/Dasm5PQVTziPo1Qx97xWfqg== 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 4b8FQF5nNKz16bN; Fri, 30 May 2025 20:36:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 54UKabDC004509; Fri, 30 May 2025 20:36:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 54UKabQB004506; Fri, 30 May 2025 20:36:37 GMT (envelope-from git) Date: Fri, 30 May 2025 20:36:37 GMT Message-Id: <202505302036.54UKabQB004506@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: 6f9b2071b843 - stable/14 - nfs_clrpcops.c: Fix handling of a CreateLayGet reply 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: 6f9b2071b8435ed366310a16cf0cb8f2e2797ae5 Auto-Submitted: auto-generated The branch stable/14 has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=6f9b2071b8435ed366310a16cf0cb8f2e2797ae5 commit 6f9b2071b8435ed366310a16cf0cb8f2e2797ae5 Author: Rick Macklem AuthorDate: 2025-05-16 19:36:39 +0000 Commit: Rick Macklem CommitDate: 2025-05-30 20:34:07 +0000 nfs_clrpcops.c: Fix handling of a CreateLayGet reply Without this patch, the CreateLayGet RPC did not handle a NFSv4.1/4.2 reply for a pNFS server that also issued delegations. This patch fixes the problem. Detected at the recent NFSv4 Bakeathon testing event. This bug would only affect the rare case where the FreeBSD client is mounted to a pNFS server that issues delegations, where the "pnfs" mount option is specified. (cherry picked from commit e647a222a1a74bd3b2bbdd7903fb30e4e30b6b09) --- sys/fs/nfsclient/nfs_clrpcops.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sys/fs/nfsclient/nfs_clrpcops.c b/sys/fs/nfsclient/nfs_clrpcops.c index d37bffc5ad2e..5722810191b4 100644 --- a/sys/fs/nfsclient/nfs_clrpcops.c +++ b/sys/fs/nfsclient/nfs_clrpcops.c @@ -8584,6 +8584,13 @@ nfsrpc_createlayout(vnode_t dvp, char *name, int namelen, struct vattr *vap, &ret, &acesize, p); if (error != 0) goto nfsmout; + } else if (deleg == NFSV4OPEN_DELEGATENONEEXT && + NFSHASNFSV4N(nmp)) { + NFSM_DISSECT(tl, uint32_t *, NFSX_UNSIGNED); + deleg = fxdr_unsigned(uint32_t, *tl); + if (deleg == NFSV4OPEN_CONTENTION || + deleg == NFSV4OPEN_RESOURCE) + NFSM_DISSECT(tl, uint32_t *, NFSX_UNSIGNED); } else if (deleg != NFSV4OPEN_DELEGATENONE) { error = NFSERR_BADXDR; goto nfsmout;