[prev in list] [next in list] [prev in thread] [next in thread]
List: varnish-commit
Subject: [master] f3e9ca6ab Add missing error handling in h2_rx_data
From: Dag Haavi Finstad <daghf () varnish-software ! com>
Date: 2019-09-24 14:59:06
Message-ID: 20190924145906.133A06602 () lists ! varnish-cache ! org
[Download RAW message or body]
commit f3e9ca6abc4a03e48df4e9894323cad25472793f
Author: Dag Haavi Finstad <daghf@varnish-software.com>
Date: Tue Sep 24 16:50:33 2019 +0200
Add missing error handling in h2_rx_data
A failing write on a different stream will set h2->error, which would
cause us to panic here on the following AZ(h2->mailcall).
Fixes: #3040
diff --git a/bin/varnishd/http2/cache_http2_proto.c b/bin/varnishd/http2/cache_http2_proto.c
index 527fb8e61..902c1e08c 100644
--- a/bin/varnishd/http2/cache_http2_proto.c
+++ b/bin/varnishd/http2/cache_http2_proto.c
@@ -750,6 +750,8 @@ h2_rx_data(struct worker *wrk, struct h2_sess *h2, struct h2_req *r2)
Lck_Lock(&h2->sess->mtx);
while (h2->mailcall != NULL && h2->error == 0 && r2->error == 0)
AZ(Lck_CondWait(h2->cond, &h2->sess->mtx, 0));
+ if (h2->error || r2->error)
+ return (h2->error ? h2->error : r2->error);
AZ(h2->mailcall);
h2->mailcall = r2;
h2->req0->r_window -= h2->rxf_len;
_______________________________________________
varnish-commit mailing list
varnish-commit@varnish-cache.org
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-commit
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic