[master] 78694521f Turn the question into an explanation

Dridi Boukelmoune dridi.boukelmoune at gmail.com
Fri Mar 8 11:02:08 UTC 2019


commit 78694521f5b41677e0c7f45907eb20ff48e7bb46
Author: Dridi Boukelmoune <dridi.boukelmoune at gmail.com>
Date:   Fri Mar 8 12:00:22 2019 +0100

    Turn the question into an explanation
    
    It was already answered outside of the commit log.

diff --git a/bin/varnishd/http2/cache_http2_proto.c b/bin/varnishd/http2/cache_http2_proto.c
index acd38868b..48ad050c7 100644
--- a/bin/varnishd/http2/cache_http2_proto.c
+++ b/bin/varnishd/http2/cache_http2_proto.c
@@ -644,8 +644,9 @@ h2_rx_headers(struct worker *wrk, struct h2_sess *h2, struct h2_req *r2)
 	if (r2 == NULL) {
 		if (h2->rxf_stream <= h2->highest_stream)
 			return (H2CE_PROTOCOL_ERROR);	// rfc7540,l,1153,1158
-		/* XXX: is it safe to load h2->open_streams without the h2
-		 * session lock held?
+		/* NB: we don't need to guard the read of h2->open_streams
+		 * because headers are handled sequentially so it cannot
+		 * increase under our feet.
 		 */
 		if (h2->open_streams >=
 		    h2->local_settings.max_concurrent_streams) {


More information about the varnish-commit mailing list