git: 983a9f7a1276 - stable/15 - compat/freebsd32: set uio_rw for trailer's uio in freebsd32_sendfile()

From: Konstantin Belousov <kib_at_FreeBSD.org>
Date: Sun, 16 Aug 2026 02:46:30 UTC
The branch stable/15 has been updated by kib:

URL: https://cgit.FreeBSD.org/src/commit/?id=983a9f7a1276550ba107ff97e199c833c09372a1

commit 983a9f7a1276550ba107ff97e199c833c09372a1
Author:     Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2026-08-14 05:00:21 +0000
Commit:     Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2026-08-16 02:41:19 +0000

    compat/freebsd32: set uio_rw for trailer's uio in freebsd32_sendfile()
    
    PR:     297516
    
    (cherry picked from commit 4b17776d9afd0009ac8547126c59c97eda0f3fc9)
---
 sys/compat/freebsd32/freebsd32_misc.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/sys/compat/freebsd32/freebsd32_misc.c b/sys/compat/freebsd32/freebsd32_misc.c
index e899c55ee5b1..08e15140317d 100644
--- a/sys/compat/freebsd32/freebsd32_misc.c
+++ b/sys/compat/freebsd32/freebsd32_misc.c
@@ -2251,6 +2251,8 @@ freebsd32_do_sendfile(struct thread *td,
 			    hdtr32.trl_cnt, &trl_uio);
 			if (error)
 				goto out;
+			trl_uio->uio_rw = UIO_WRITE;
+			trl_uio->uio_td = td;
 		}
 	}