[master] 550b926 Hold lock over h2req->vsl

Poul-Henning Kamp phk at FreeBSD.org
Sun Mar 5 15:16:04 CET 2017


commit 550b9264a2559153ab3a07d25f52573c92c65e21
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Sun Mar 5 14:01:12 2017 +0000

    Hold lock over h2req->vsl

diff --git a/bin/varnishd/http2/cache_http2_proto.c b/bin/varnishd/http2/cache_http2_proto.c
index d9e0cbb..018c15e 100644
--- a/bin/varnishd/http2/cache_http2_proto.c
+++ b/bin/varnishd/http2/cache_http2_proto.c
@@ -702,7 +702,9 @@ h2_rxframe(struct worker *wrk, struct h2_sess *h2)
 		h2->rxf_flags &= h2f->flags;
 	}
 
+	Lck_Lock(&h2->sess->mtx);
 	h2_vsl_frame(h2, h2->htc->rxbuf_b, 9L + h2->rxf_len);
+	Lck_Unlock(&h2->sess->mtx);
 
 	h2e = h2_procframe(wrk, h2, h2f);
 	if (h2e) {



More information about the varnish-commit mailing list