From nobody Tue May 19 00:59:37 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 4gKGXn2ZyTz6d9J0 for ; Tue, 19 May 2026 00:59: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gKGXn1lhJz4Hg8 for ; Tue, 19 May 2026 00:59:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779152377; 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=XwUSXKTNWJLORoBsZuRK0HQ9Rc5/7RTJjLyrFJBnReY=; b=HpqwqSVJx6djKRPUS9RVtSrna8lqAdYbDWUUSVKHauELT2Tj60tJqucksX1L+57HGI5Bf0 R/qfiCaVLQr58EMhAz+b04QAx1cN0QmnB5z4LiwdgfaZTQPdwxUJhGaCRmxb9S3ArkRE/U luNdVjS8ClhQR3ALCsruzuYV+DZRNux8g8RHJK6XldFiq+W2wjTNE6Up4YC/x8mXACF4yG vhPaL3uyo1OnwoY+ac27UyfFzpXH3eFxGHYKgokO1Ro9lwXlAI03ChWBn2fdfeIJCCQ1ZI YlBV9O+TggGGyehOZeY7kSVulelaZGJq6fcPEUwI9GNd4rzHKvKKzleNZSFg6A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779152377; a=rsa-sha256; cv=none; b=Y8qTSyk8sOIRmN6T1i87cIByPgxxDE7UIx5HUWibQEapVx8IGBj83SwT1CGovw2eS4fJxF 3OLhidwtWxF3n8s3jgOZVE8VGmQPmN8I7U739RU2FeJhF733eV/cgfZ/73VylXETouHSi1 S1Zl8dv3mDydP410Gckl//2c3U04HF2/lpr5MUL3gDTCOyvwHtWwCMOHBfx167PfnfM21b 1/E21NuLzQW3mDXzB/GUQAbqIxEt+iu36NCuYsDeAhAY6+S038ss6ycxb70THP9BVv379a JRW0YUd5SW9rTMGyjpAmxSjct7jSl6V/C3nDw7N3c22fiAVE7dGvI/rkNy91gg== 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=1779152377; 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=XwUSXKTNWJLORoBsZuRK0HQ9Rc5/7RTJjLyrFJBnReY=; b=VjO5mb1aEkMvyzIfx75iSjCRcTtCkO9L7cux+qKKBfYOFsBzmUGccf+LOz8Z9SyT/j3sww suHXq/9Sz8PflyoEqkjANbY6jj2xviIT9Jdp1RoGfN/Ei5baP26eQiEysomo1hAesjiQL2 TbSQvUvupGLPuywQv+wJrkdUqr0B2F7XqD/6Qx+9NUyGtFPBeN8UZACK6I7Sf4+204rB5J fwqn2dMxH5x2AitTqR2bAruaxqXtHMuOoELsyJFKhsG26I40L7JK/TXk2ismANHJ603ptV 0x0V3XX5QHYCdpz9NVppko2+cs9eO/H70WfzHD5+ApqYQ80YMvF8VDIfx4sWxg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gKGXn15nbzs6K for ; Tue, 19 May 2026 00:59:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 27d31 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 19 May 2026 00:59:37 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Rick Macklem Subject: git: 29a286d14ac5 - stable/14 - 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/14 X-Git-Reftype: branch X-Git-Commit: 29a286d14ac50b73e3f241a8b8d4f4a4afdd22cc Auto-Submitted: auto-generated Date: Tue, 19 May 2026 00:59:37 +0000 Message-Id: <6a0bb5f9.27d31.683d7889@gitrepo.freebsd.org> The branch stable/14 has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=29a286d14ac50b73e3f241a8b8d4f4a4afdd22cc commit 29a286d14ac50b73e3f241a8b8d4f4a4afdd22cc Author: Rick Macklem AuthorDate: 2026-05-05 00:04:00 +0000 Commit: Rick Macklem CommitDate: 2026-05-18 23:57:26 +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 460d08bd1da0..8d4501a286cc 100644 --- a/sys/fs/nfsserver/nfs_nfsdserv.c +++ b/sys/fs/nfsserver/nfs_nfsdserv.c @@ -4616,6 +4616,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)