diff options
| author | Rick Macklem <rmacklem@FreeBSD.org> | 2026-05-14 22:17:55 +0000 |
|---|---|---|
| committer | Rick Macklem <rmacklem@FreeBSD.org> | 2026-05-14 22:17:55 +0000 |
| commit | 13d3bd165e225eec9af91b6e3361c2482931f95b (patch) | |
| tree | b4bbb2581796cd4c996ce9933090603d25b34d3a | |
| parent | 4080419d9a2d88d44d20baaf3ea01934561819c1 (diff) | |
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
| -rw-r--r-- | sys/kern/subr_uio.c | 2 |
1 files changed, 0 insertions, 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); |
