BUG/MAJOR: xprt-quic: do not queue qc timer if not set

Do not queue the pto/loss-detection timer if set to TICK_ETERNITY. This
usage is invalid with the scheduler and cause a BUG_ON trigger.
This commit is contained in:
Amaury Denoyelle 2021-10-05 14:42:25 +02:00
parent 139814a67a
commit 336f6fd964

View File

@ -647,6 +647,7 @@ static inline void qc_set_timer(struct ssl_sock_ctx *ctx)
if (tick_isset(pto)) if (tick_isset(pto))
qc->timer = pto; qc->timer = pto;
out: out:
if (qc->timer != TICK_ETERNITY)
task_schedule(qc->timer_task, qc->timer); task_schedule(qc->timer_task, qc->timer);
TRACE_LEAVE(QUIC_EV_CONN_STIMER, ctx->conn, pktns); TRACE_LEAVE(QUIC_EV_CONN_STIMER, ctx->conn, pktns);
} }