From nobody Thu May 14 22:19:35 2026 X-Original-To: dev-commits-src-main@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 4gGl9z5N0Cz5vvSZ for ; Thu, 14 May 2026 22:19:35 +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 4gGl9z4Yllz3YXs for ; Thu, 14 May 2026 22:19:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1778797175; 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=Z158jur/VXZn1BbIc1S/f9oChT6EqNTCcvTOw1VFon0=; b=V9H4SpTEek1N67WN+/yLmtYX+OzVpkHbrcK4D/X5CtW6BEHcc3OM5QfQy5iKTV9YI/cS/T vz/dB5qiUhS6livR+q53FObOY7irVLQ4AyAKC/obxh+CyB05hi9iHF4q6QZdJt1+3la75k fMgknbERB3rxje6KQnOTvhsZPe6HVgNF9eqgAvns11VK7DsRAoDEe/acekiscBv4lnSHPW M2R8jkiVB+31+s/QqfRbjqSixLQKyfolrOaKZPlyjXJLz9iASvECI2cVFFeq6ZzayWfbxX v+l44Lb+2HUHEeXPpQdAwt9yZu7GoCee5x0B+1vIDVztjNsfwhwkMAeipDennA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1778797175; a=rsa-sha256; cv=none; b=QKT6a2NPqO3wtUoVCHfMAgRf3fmP2/S7cOqtu9lceimLbFCJkvJevaSFnKL0uLRC/7vPhx bqxadvR44v/jObAYnhk66lkBZapHKYQ+tifHmp9kPZX6AZ/QrYfeQcGX6U4vYzTabzFrme kD03BTayzPFH6Ncph/pIWjFIqJWPQOOexHkBtGe9fvmCQNTS+Gg3uoXCMw2JRX/0+mYYgl SksQ4NxdqzQaaMOehAeCO+mEgPSRsf1yHXqkRo2m4eTrKkylJUpJYhwhfp7IP+sCShRkmr qwARHDwWBxKhSSDQ7vo2LVELHn9bzVE0xMzWjZ7ogF9qEG1x2qZrEhpX4eoQlg== 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=1778797175; 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=Z158jur/VXZn1BbIc1S/f9oChT6EqNTCcvTOw1VFon0=; b=wd/zvM3M2QF5Vc58IK1Ddb+sIiTFnpMLU/HQr0ZyOgfXHD6jP492KEQTcR4B+xXFB0tRd0 xuiK1m/8lYgXqbSYJ57ymm+FdnBd9LsA4wAW5ShtP+mFeJoVNIKOW8Oas6of7JZ47a5j/w npgvEmnIxMZjGyPcKMkVAEkv94WunzwFTzrtNDFUpK7sPKzlaaGPuyPStcIlrpxSua/Hqu ml+WK60QNw0S70va67yzs8Thu9c+6zoamMsHMh7+Gip5PFap3/TfxKkOdRGB1imHXKrZ/1 v5Jto/QY/1jkgNfxq+KmLS3Nxe0tVzXd5Giqm6Lh6RVmh0qwx78nnf1Jun6uhg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gGl9z3d73zwYJ for ; Thu, 14 May 2026 22:19:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 422a5 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 14 May 2026 22:19:35 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Rick Macklem Subject: git: 13d3bd165e22 - main - subr_uio.c: Remove a KASSERT() for large NFS server I/O List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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/main X-Git-Reftype: branch X-Git-Commit: 13d3bd165e225eec9af91b6e3361c2482931f95b Auto-Submitted: auto-generated Date: Thu, 14 May 2026 22:19:35 +0000 Message-Id: <6a064a77.422a5.5d3744f6@gitrepo.freebsd.org> The branch main has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=13d3bd165e225eec9af91b6e3361c2482931f95b commit 13d3bd165e225eec9af91b6e3361c2482931f95b Author: Rick Macklem AuthorDate: 2026-05-14 22:17:55 +0000 Commit: Rick Macklem CommitDate: 2026-05-14 22:17:55 +0000 subr_uio.c: Remove a KASSERT() for large NFS server I/O When the NFS server is set to allow an I/O size greater than 1Mbyte (not allowed in FreeBSD's main yet), a KASSERT() in allocuio() can fail when: zfs_freebsd_write()->zfs_write()->zfs_uiocopy() ->cloneuio()->allocuio() is called for a large NFS server write. Since the userland API callers to allocuio() already check that the size does not exceed UIO_MAXIOV, there does not seem to be a need to a KASSERT() here. Removing the KASSERT() allows NFS server writes of greater than 1Mbyte to work, once the NFS code is patched to allow them. Reviewed by: kib MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D57005 --- sys/kern/subr_uio.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/sys/kern/subr_uio.c b/sys/kern/subr_uio.c index 6ac932fb6690..fa5865fbe938 100644 --- a/sys/kern/subr_uio.c +++ b/sys/kern/subr_uio.c @@ -441,8 +441,6 @@ allocuio(u_int iovcnt) struct uio *uio; int iovlen; - KASSERT(iovcnt <= UIO_MAXIOV, - ("Requested %u iovecs exceed UIO_MAXIOV", iovcnt)); iovlen = iovcnt * sizeof(struct iovec); uio = malloc(iovlen + sizeof(*uio), M_IOV, M_WAITOK); uio->uio_iov = (struct iovec *)(uio + 1);