git: aa1c5de9d27e - stable/14 - tcp: clear sendfile logging struct
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 07 Apr 2025 12:55:18 UTC
The branch stable/14 has been updated by tuexen:
URL: https://cgit.FreeBSD.org/src/commit/?id=aa1c5de9d27e71739309f5bcc06363115cbf404e
commit aa1c5de9d27e71739309f5bcc06363115cbf404e
Author: Peter Lei <peterlei@netflix.com>
AuthorDate: 2025-04-04 20:07:09 +0000
Commit: Michael Tuexen <tuexen@FreeBSD.org>
CommitDate: 2025-04-07 12:54:52 +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
Sponsored by: Netflix, Inc.
(cherry picked from commit 3bd1e85fc13cb90853046300dcaa31d63b45ee21)
---
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;