tcp: clear sendfile logging struct

The sendfile black box logging struct is much smaller than the
encompassing stack specific logging union. Be sure to clear the
trailing unused memory when logging.

Reviewed by:	tuexen
Sponsored by:	Netflix, Inc.

(cherry picked from commit 3bd1e85fc1)
This commit is contained in:
Peter Lei 2025-04-04 22:07:09 +02:00 committed by Michael Tuexen
parent cc52d73deb
commit aa1c5de9d2

View file

@ -2878,6 +2878,7 @@ tcp_log_sendfile(struct socket *so, off_t offset, size_t nbytes, int flags)
struct timeval tv;
tcp_log_eventspecific_t log;
memset(&log, 0, sizeof(log));
microuptime(&tv);
log.u_sf.offset = offset;
log.u_sf.length = nbytes;