[master] 45de3ad VSL the frame before holding the mtx

Poul-Henning Kamp phk at FreeBSD.org
Wed Sep 7 09:41:10 CEST 2016


commit 45de3ad225f28f2dfeef5c901aff33a62d79fb73
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Wed Sep 7 07:40:02 2016 +0000

    VSL the frame before holding the mtx

diff --git a/bin/varnishd/http2/cache_http2_proto.c b/bin/varnishd/http2/cache_http2_proto.c
index 6c69558..f76263f 100644
--- a/bin/varnishd/http2/cache_http2_proto.c
+++ b/bin/varnishd/http2/cache_http2_proto.c
@@ -513,6 +513,8 @@ h2_rxframe(struct worker *wrk, struct h2_sess *h2)
 	/* XXX: later full DATA will not be rx'ed yet. */
 	HTC_RxPipeline(h2->htc, h2->htc->rxbuf_b + h2->rxf_len + 9);
 
+	h2_vsl_frame(h2, h2->htc->rxbuf_b, 9L + h2->rxf_len);
+
 	Lck_Lock(&h2->sess->mtx);
 	VTAILQ_FOREACH(r2, &h2->streams, list)
 		if (r2->stream == h2->rxf_stream)
@@ -523,8 +525,6 @@ h2_rxframe(struct worker *wrk, struct h2_sess *h2)
 		r2 = h2_new_req(wrk, h2, h2->rxf_stream, NULL);
 	}
 
-	h2_vsl_frame(h2, h2->htc->rxbuf_b, 9L + h2->rxf_len);
-
 	ft = (enum h2frame)h2->htc->rxbuf_b[3];
 	switch (ft) {
 #define H2_FRAME(l,u,t,f)					\



More information about the varnish-commit mailing list