git: 2694c869ff9f - main - ktls: fix a panic with INVARIANTS
Hans Petter Selasky
hps at selasky.org
Thu Aug 5 18:52:34 UTC 2021
On 8/5/21 8:49 PM, Hans Petter Selasky wrote:
> On 8/5/21 7:10 PM, Andrew Gallatin wrote:
>> + tsleep_sbt(sc, PZERO, "waiting for work", SBT_MAX, SBT_1S, 0);
>
> Hi,
>
> This basically puts a useless callout into the timer subsystem forever.
> I think if you don't care about this tsleep being accurate, then lock
> Giant and use sbt = 0.
>
> In between, I think that assert in question should be updated.
>
> --HPS
Or update the code:
if (sbt != 0)
sleepq_set_timeout_sbt(ident, sbt, pr, flags);
Should maybe be:
if (sbt > 0 && sbt < SBT_MAX)
sleepq_set_timeout_sbt(ident, sbt, pr, flags);
--HPS
More information about the dev-commits-src-all
mailing list