From nobody Tue May 19 00:56:16 2026 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 4gKGT16l4dz6d8q7 for ; Tue, 19 May 2026 00:56:21 +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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gKGT16FBMz4Gnr for ; Tue, 19 May 2026 00:56:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779152181; 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=TREsWk8NrS/huFCq5s54y5Av6fjWlIaxnegVJjumWD8=; b=tkCEz/d+AMq+eDUb/yj7D6CPQrvemcG0CBjf91aIM3aYrtOeOJmQ9LP+BRrnKzr3ucD482 EAyzTd417/yv+U6vmtT60HcKTwJsnyRG13wVvzw1pOvaqnUkF+iY5Md8945fzbnubjsN7Z AoSE0qZPa9XJdPSf+QhK3EuqK3oR3In6YpKfcUmtBzDXKjKjq2TsK0fFxO2aA73bMn4oiM pHGgTatnl4YaFc2O9Bfxm1bxwv9d+tYpex+0JXLBcLuu/lYD3XOEOBt+BAup1eCPIKneLS oqGV55GBPh1sMa0kz/27vHZvXBngyFE/8Gs/6+ucJEK3cRdNXD5fjea0EEBrFg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779152181; a=rsa-sha256; cv=none; b=JssnC11ZQ0nUMfyA4/VjPgBEo1Sfe4Pi9ZGMsGwBHg3sKEPoeVHFnGHc7bdq/dCXJFn+tq ZsesuNvEqJ4rIozEPHD1WYCOFu1rKljViE+AUrMLrtA0qWKDiav7fGO4kxqMxJCJtMZ5hh EfqMVwBD4OkzKCPRIdQMRrtxq/nWVJklZeoh5KkUnyW6PnagRCkLthOQ8saNxas0X0RUle XgvT1uWQpJxm75LBAkmuRf4epOvQKhUAFy25ovsCGVAd7kSf1rsS1GQJHLDuMDRcMNTpnK 6oPIgcmv6Mh4VeKZ7Dr/zlxe0iT50vFBxXQzA6l+OrF/sU0rYcwhbwSLdA+YaA== 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=1779152181; 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=TREsWk8NrS/huFCq5s54y5Av6fjWlIaxnegVJjumWD8=; b=SGP4Wd7DHYyPoHMpoTaaZMqtVJHdPE5UUKv6McBGH1AQ82HPJrih6tE4cZ8GEdvnR7nnQA GbmX/Nwi1nlKD2s/wNtd/ENXpfyXEzuRiFlYZVXHb1QQRq0WVO2qzj0FGJNSOz32x8Lky0 wpA7Pesv/xJ6DuIiEY/rPXlnbaVOOoEaf6cbSZAdFSw/O1GYzjKRfywRw6EsMlVHhcJtb9 KmJGfenGBC80BeIBW4yCaubKNFwn5TOpZd4k6cOQLPfHk0qkGr9Moq1eTUaUT7JbHEtJA8 JTg38r4pP0OaZVdR6LUzVy+TbPDSQIpuVvVenSAAxNF03M4dhhssO8LNVBZoZg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gKGT15lfwzsWF for ; Tue, 19 May 2026 00:56:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 26767 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 19 May 2026 00:56:16 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Rick Macklem Subject: git: 3414663b2cce - stable/15 - nfs_nfsdserv.c: Clip number of callback slots 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 List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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/15 X-Git-Reftype: branch X-Git-Commit: 3414663b2ccea7fcf5324dc47501702e238b589e Auto-Submitted: auto-generated Date: Tue, 19 May 2026 00:56:16 +0000 Message-Id: <6a0bb530.26767.7fb90c00@gitrepo.freebsd.org> The branch stable/15 has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=3414663b2ccea7fcf5324dc47501702e238b589e commit 3414663b2ccea7fcf5324dc47501702e238b589e Author: Rick Macklem AuthorDate: 2026-05-05 00:04:00 +0000 Commit: Rick Macklem CommitDate: 2026-05-18 23:54:35 +0000 nfs_nfsdserv.c: Clip number of callback slots The client tells the server how many callback slots it can handle in the callback session. However, the NFSv4.1/4.2 server can only handle a maximum of NFSV4_SLOTS slots. This patch clips the client's value to that, to avoid using too high a slot# for a callback. Fortunately, I do not know of an extant client that specifies a value greater than NFSV4_SLOTS, so this patch is not really needed, as yet. Also, the client rarely uses a slot# above 0 when doing callbacks. (cherry picked from commit 03e9e83f358678bab5e4c1ddf9c9d8faa7183cbb) --- sys/fs/nfsserver/nfs_nfsdserv.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sys/fs/nfsserver/nfs_nfsdserv.c b/sys/fs/nfsserver/nfs_nfsdserv.c index 55bf56c4daf1..41f3c6893378 100644 --- a/sys/fs/nfsserver/nfs_nfsdserv.c +++ b/sys/fs/nfsserver/nfs_nfsdserv.c @@ -4866,6 +4866,14 @@ nfsrvd_createsession(struct nfsrv_descript *nd, __unused int isdgram, *tl++ = txdr_unsigned(sep->sess_cbsess.nfsess_foreslots); *tl++ = txdr_unsigned(1); *tl = txdr_unsigned(0); /* No RDMA. */ + /* + * Although the client accepts slot#s up to + * sess_cbsess.nfsess_foreslots, the server can only use + * a maximum of NFSV4_SLOTS, so clip it to avoid ever using + * too high a slot. + */ + if (sep->sess_cbsess.nfsess_foreslots > NFSV4_SLOTS) + sep->sess_cbsess.nfsess_foreslots = NFSV4_SLOTS; } nfsmout: if (nd->nd_repstat != 0 && sep != NULL)