git: 0cc48e631781 - stable/14 - TCP RACK: don't log an uninitialized value
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 05 Feb 2025 20:59:46 UTC
The branch stable/14 has been updated by tuexen:
URL: https://cgit.FreeBSD.org/src/commit/?id=0cc48e6317819a1ed2bba523b7014940ef2f9b61
commit 0cc48e6317819a1ed2bba523b7014940ef2f9b61
Author: Michael Tuexen <tuexen@FreeBSD.org>
AuthorDate: 2025-01-08 22:15:54 +0000
Commit: Michael Tuexen <tuexen@FreeBSD.org>
CommitDate: 2025-02-05 10:00:04 +0000
TCP RACK: don't log an uninitialized value
reduce is uninitialized, if the code path for logging is reached via
goto old_method;.
Reviewed by: rrs, Peter Lei
CID: 1557359
Sponsored by: Netflix, Inc.
Differential Revision: https://reviews.freebsd.org/D48346
(cherry picked from commit 4c89d59e0cdac4d83fb5841aefae9214545b2273)
---
sys/netinet/tcp_stacks/rack.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/sys/netinet/tcp_stacks/rack.c b/sys/netinet/tcp_stacks/rack.c
index 2fefcdcbf01d..fd8054febb54 100644
--- a/sys/netinet/tcp_stacks/rack.c
+++ b/sys/netinet/tcp_stacks/rack.c
@@ -17699,7 +17699,7 @@ rack_get_pacing_delay(struct tcp_rack *rack, struct tcpcb *tp, uint32_t len, str
* the peer to have a gap in data sending.
*/
uint64_t cwnd, tr_perms = 0;
- int32_t reduce = 0;
+ int32_t reduce;
old_method:
/*
@@ -17736,7 +17736,8 @@ rack_get_pacing_delay(struct tcp_rack *rack, struct tcpcb *tp, uint32_t len, str
slot -= reduce;
} else
slot = 0;
- }
+ } else
+ reduce = 0;
slot *= HPTS_USEC_IN_MSEC;
if (rack->rc_pace_to_cwnd) {
uint64_t rate_wanted = 0;