Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 16 Jan 2024 19:05:17 GMT
From:      Gleb Smirnoff <glebius@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: daa0dc908882 - stable/14 - Fix two latent bugs in hpts. One where a static is put on a local variable, the other an initialization bug where we should be setting tv.tv_sec to 0.
Message-ID:  <202401161905.40GJ5HOk010326@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/14 has been updated by glebius:

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

commit daa0dc908882f1a724dbe61af2ee86115bd86461
Author:     Randall Stewart <rrs@FreeBSD.org>
AuthorDate: 2023-11-27 19:38:06 +0000
Commit:     Gleb Smirnoff <glebius@FreeBSD.org>
CommitDate: 2024-01-16 18:47:49 +0000

    Fix two latent bugs in hpts. One where a static is put on
    a local variable, the other an initialization bug where
    we should be setting tv.tv_sec to 0.
    
    PR:     275482
    (cherry picked from commit 6a79e48076bcce3e902323e62689eacb98faa180)
---
 sys/netinet/tcp_hpts.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/sys/netinet/tcp_hpts.c b/sys/netinet/tcp_hpts.c
index e39c2b69ea7e..a85eca08b815 100644
--- a/sys/netinet/tcp_hpts.c
+++ b/sys/netinet/tcp_hpts.c
@@ -1527,6 +1527,7 @@ __tcp_run_hpts(struct tcp_hpts_entry *hpts)
 				hpts->p_mysleep.tv_usec = dynamic_min_sleep;
 			/* Reschedule with new to value */
 			tcp_hpts_set_max_sleep(hpts, 0);
+			tv.tv_sec = 0;
 			tv.tv_usec = hpts->p_hpts_sleep_time * HPTS_TICKS_PER_SLOT;
 			/* Validate its in the right ranges */
 			if (tv.tv_usec < hpts->p_mysleep.tv_usec) {
@@ -1608,7 +1609,7 @@ tcp_choose_hpts_to_run(void)
 void
 tcp_run_hpts(void)
 {
-	static struct tcp_hpts_entry *hpts;
+	struct tcp_hpts_entry *hpts;
 	struct epoch_tracker et;
 
 	NET_EPOCH_ENTER(et);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202401161905.40GJ5HOk010326>