packages/net/haproxy/patches/013-BUG-MEDIUM-mux-h2-fix-missing-test-on-sending_list-in-previous-patch.patch
Christian Lachner fdaa55a918 haproxy: Update HAProxy to v2.1.2
- Major version jump from v2.0 to v2.1
- Update haproxy download URL and hash
- Add new patches (see https://www.haproxy.org/bugs/bugs-2.1.2.html)
- Stop building LUA 5.3 in the haproxy build-process and use liblua5.3 as a dependency instead

Signed-off-by: Christian Lachner <gladiac@gmail.com>
2020-02-03 07:54:31 +01:00

32 lines
1.1 KiB
Diff

commit d6c19ac2c0458445e521fd08eded304c26eecfe7
Author: Willy Tarreau <w@1wt.eu>
Date: Fri Jan 10 18:20:15 2020 +0100
BUG/MEDIUM: mux-h2: fix missing test on sending_list in previous patch
Previous commit 989539b048 ("BUG/MINOR: mux-h2: use a safe
list_for_each_entry in h2_send()") accidently lost its sending_list test,
resulting in some elements to be woken up again while already in the
sending_list and h2_unsubscribe() crashing on integrity tests (only
when built with DEBUG_DEV).
If the fix above is backported this one must be as well.
(cherry picked from commit 70c5b0e5fd5ad243f4645b37a0f89068de97e90e)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
diff --git a/src/mux_h2.c b/src/mux_h2.c
index 92a50da24..d46a316ac 100644
--- a/src/mux_h2.c
+++ b/src/mux_h2.c
@@ -3265,6 +3265,10 @@ static void h2_resume_each_sending_h2s(struct h2c *h2c, struct list *head)
break;
h2s->flags &= ~H2_SF_BLK_ANY;
+
+ if (LIST_ADDED(&h2s->sending_list))
+ continue;
+
/* For some reason, the upper layer failed to subscribe again,
* so remove it from the send_list
*/