aboutsummaryrefslogtreecommitdiff
path: root/sys/kern/uipc_ktls.c
diff options
context:
space:
mode:
authorAndrew Gallatin <gallatin@FreeBSD.org>2021-08-05 17:05:00 +0000
committerAndrew Gallatin <gallatin@FreeBSD.org>2021-08-05 17:09:06 +0000
commit2694c869ff9ff60fd8e3d4d7936b7dc61763c18a (patch)
tree725fed1d8b0105ac02ca252aeb7e4124953337cd /sys/kern/uipc_ktls.c
parent4cc6fe1e5b73ce540882753d918bc8208849e9e9 (diff)
downloadsrc-2694c869ff9ff60fd8e3d4d7936b7dc61763c18a.tar.gz
src-2694c869ff9ff60fd8e3d4d7936b7dc61763c18a.zip
ktls: fix a panic with INVARIANTS
98215005b747fef67f44794ca64abd473b98bade introduced a new thread that uses tsleep(..0) to sleep forever. This hit an assert due to sleeping with a 0 timeout. So spell "forever" using SBT_MAX instead, which does not trigger the assert. Pointy hat to: gallatin Pointed out by: emaste Sponsored by: Netflix
Diffstat (limited to 'sys/kern/uipc_ktls.c')
-rw-r--r--sys/kern/uipc_ktls.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/kern/uipc_ktls.c b/sys/kern/uipc_ktls.c
index 17b87195fc50..47815c266667 100644
--- a/sys/kern/uipc_ktls.c
+++ b/sys/kern/uipc_ktls.c
@@ -2240,7 +2240,7 @@ ktls_alloc_thread(void *ctx)
nbufs = 0;
for (;;) {
atomic_store_int(&sc->running, 0);
- tsleep(sc, PZERO, "waiting for work", 0);
+ tsleep_sbt(sc, PZERO, "waiting for work", SBT_MAX, SBT_1S, 0);
atomic_store_int(&sc->running, 1);
sc->wakeups++;
if (nbufs != ktls_max_alloc) {