From nobody Tue May 19 00:56:16 2026 X-Original-To: dev-commits-src-branches@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 4gKGSw4j48z6d8ds for ; Tue, 19 May 2026 00:56:16 +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 4gKGSw41Sdz4GYk for ; Tue, 19 May 2026 00:56:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779152176; 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=rosS9K2J1Rwn1mZzUE+oKpGUbb6Rpn6Ec6EyDentW+1Ofzxfw5Mqi+IY0XkKxgI06c8A8R 4OcsOLjC/A/1f0gZ0yyMH5N/tdM0VHNNabt1aEx3cjAIMIYmGieY4BHkpXGO6yGPFgEDby AqqfoCZ1X5dc3oHThHNWx0ZhfS7zijNEX/u0Cjz8AAimrmpzrFQZtS8KJfi6e83z76YJfk 5ScJCC7+banjBByv7mRvaJMdO7kcIjkTj2aoEgK0/577SDzaKAjKp7stqmwaIijbECpxTa MPzsZqpCqCLCWLRPQQ9bXlML3CkE8yGPzZSm8BtCYvd5niire8UPQCdwVx88Kg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779152176; a=rsa-sha256; cv=none; b=wrE3yqxOTZBXKtC028EwCPLyIkLgYQFUKhG69t5nyz3temnyRqZs8a2GDVxX/X4B4yBgFX lgdY9fQ5kRSr5NwkvgaSU2u2Fb58UdK0OcYMMLPEcDb6kgylamfUa/YJadslW48lZ2LuEV HwU36SpYM3cCtNsQA5KOGtjA+OISurbz1iZP9Z+aK2iEPlRi0i6dTRZeybuGG1j9egqq8S We2G7XA3zszNZDmf9ehTxNsUtO2R4SJRd913bv3GQq73JDc3joEI346q6Ua6PWkjZKH5HJ GmWNJ46kagFb7m0LXQtzH2I//w2xodjVAkga6rerO+nfqJBy58Yr0Bg6aULOzA== 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=1779152176; 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=D9VrFLAdcRE4A3olpwDeTE5exgEQYQqh4nLQOKv/AYEcgHViYCJxjhMlXMz0r9q8sRsmrz 6VClwZ6mFFIPQSsuuwKO/DGC0hFl+zV8uipdIJ2fDJ0b3yDrX+isqtxiwlYqEx+PMVNVIH slGqoKB0XfsxkTJCu7QZImQOlL6uSh3g9IITLufxZaDaaZixqMsRZ2Y4N+bec8NgEUL3ZA z+0wYqb7Z0DFMgvNK6rehSgNmX8v7P+EtPmZqldZvYM318L/89nd7RXMHaaxxw5B7b51g4 1rSLgGVjYjUfmIx4LWQ8G3IAszxjYmJuLdIGDLGBZ5ugxirowKYrtXz5FUIXPw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gKGSw3cjQzsWD for ; Tue, 19 May 2026 00:56:16 +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: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@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)