git: 3bd1e85fc13c - main - tcp: clear sendfile logging struct
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 04 Apr 2025 20:09:20 UTC
The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=3bd1e85fc13cb90853046300dcaa31d63b45ee21 commit 3bd1e85fc13cb90853046300dcaa31d63b45ee21 Author: Peter Lei <peterlei@netflix.com> AuthorDate: 2025-04-04 20:07:09 +0000 Commit: Michael Tuexen <tuexen@FreeBSD.org> CommitDate: 2025-04-04 20:07:09 +0000 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 MFC after: 3 days Sponsored by: Netflix, Inc. --- sys/netinet/tcp_log_buf.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/netinet/tcp_log_buf.c b/sys/netinet/tcp_log_buf.c index e9ad05382b81..5142b3ebdd71 100644 --- a/sys/netinet/tcp_log_buf.c +++ b/sys/netinet/tcp_log_buf.c @@ -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;