]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: rhttp: fix task_wakeup state
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Thu, 16 May 2024 15:37:46 +0000 (17:37 +0200)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Wed, 22 May 2024 08:01:57 +0000 (10:01 +0200)
TASK_WOKEN_ANY was incorrectly used as argument to task_wakeup() for
rhttp preconnect task. This value is used as a flag. Replace it by
proper individual values. This is labelled as a bug but it has no known
impact.

This should be backported up to 2.9.

src/connection.c
src/proto_rhttp.c

index 97378632c33a3bbfc66d46227d58087624eb1d42..05704741751c4e4bb5f449d555ace7e217a7330e 100644 (file)
@@ -134,7 +134,7 @@ fail:
                        /* If connection is interrupted  without CO_FL_ERROR, receiver task won't free it. */
                        BUG_ON(!(conn->flags & CO_FL_ERROR));
 
-                       task_wakeup(l->rx.rhttp.task, TASK_WOKEN_ANY);
+                       task_wakeup(l->rx.rhttp.task, TASK_WOKEN_RES);
                }
                return -1;
        } else
@@ -2796,7 +2796,7 @@ int conn_reverse(struct connection *conn)
 
                conn->target = &l->obj_type;
                conn->flags |= CO_FL_ACT_REVERSING;
-               task_wakeup(l->rx.rhttp.task, TASK_WOKEN_ANY);
+               task_wakeup(l->rx.rhttp.task, TASK_WOKEN_RES);
        }
 
        /* Invert source and destination addresses if already set. */
index 55f10ec3a887cd5f069799b618b662d064accb84..736351375fbae84705ea8119e51cbf267eecd1c3 100644 (file)
@@ -387,7 +387,7 @@ void rhttp_enable_listener(struct listener *l)
                l->rx.rhttp.state = LI_PRECONN_ST_INIT;
        }
 
-       task_wakeup(l->rx.rhttp.task, TASK_WOKEN_ANY);
+       task_wakeup(l->rx.rhttp.task, TASK_WOKEN_INIT);
 }
 
 void rhttp_disable_listener(struct listener *l)