git: 947dd1ca1297 - stable/15 - subr_uio.c: Remove a KASSERT() for large NFS server I/O
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 28 May 2026 02:46:10 UTC
The branch stable/15 has been updated by rmacklem:
URL: https://cgit.FreeBSD.org/src/commit/?id=947dd1ca129787b93cca3bf390c3a34032a49ac9
commit 947dd1ca129787b93cca3bf390c3a34032a49ac9
Author: Rick Macklem <rmacklem@FreeBSD.org>
AuthorDate: 2026-05-14 22:17:55 +0000
Commit: Rick Macklem <rmacklem@FreeBSD.org>
CommitDate: 2026-05-28 02:44:46 +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.
(cherry picked from commit 13d3bd165e225eec9af91b6e3361c2482931f95b)
---
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);