]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MEDIUM: mux-h2: fix missing test on sending_list in previous patch
authorWilly Tarreau <w@1wt.eu>
Fri, 10 Jan 2020 17:20:15 +0000 (18:20 +0100)
committerWilly Tarreau <w@1wt.eu>
Fri, 10 Jan 2020 17:20:15 +0000 (18:20 +0100)
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.

src/mux_h2.c

index c4572d553c264e9615b47478b0572b1e8dd26733..abc7e7c5599a73d0b8d4c6f5ef8e59cb9a9a9d7c 100644 (file)
@@ -3262,6 +3262,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
                 */