[master] ed0b45dd2 H2: Add sanity assertions to h2_send_get_locked()
Martin Blix Grydeland
martin at varnish-software.com
Thu Aug 21 08:42:02 UTC 2025
commit ed0b45dd28ba8044f0c9e5af746124880062479c
Author: Martin Blix Grydeland <martin at varnish-software.com>
Date: Wed Aug 20 13:21:34 2025 +0200
H2: Add sanity assertions to h2_send_get_locked()
These assertions guard against double-registering on the send queue.
diff --git a/bin/varnishd/http2/cache_http2_send.c b/bin/varnishd/http2/cache_http2_send.c
index 3461bdb38..620863385 100644
--- a/bin/varnishd/http2/cache_http2_send.c
+++ b/bin/varnishd/http2/cache_http2_send.c
@@ -107,6 +107,8 @@ h2_send_get_locked(struct worker *wrk, struct h2_sess *h2, struct h2_req *r2)
Lck_AssertHeld(&h2->sess->mtx);
if (&wrk->cond == h2->cond)
ASSERT_RXTHR(h2);
+ AZ(H2_SEND_HELD(h2, r2));
+ AZ(r2->wrk);
r2->wrk = wrk;
VTAILQ_INSERT_TAIL(&h2->txqueue, r2, tx_list);
while (!H2_SEND_HELD(h2, r2))
More information about the varnish-commit
mailing list