acpid: update to 2.0.28
[feed/packages.git] / net / haproxy / patches / 0018-BUG-MINOR-lua-always-detach-the-tcp-http-tasks-befor.patch
1 From dd18f945c26fc30872a52c66b06b5a0a86b10060 Mon Sep 17 00:00:00 2001
2 From: Willy Tarreau <w@1wt.eu>
3 Date: Mon, 24 Jul 2017 17:35:27 +0200
4 Subject: [PATCH 18/18] BUG/MINOR: lua: always detach the tcp/http tasks before
5 freeing them
6
7 In hlua_{http,tcp}_applet_release(), a call to task_free() is performed
8 to release the task, but no task_delete() is made on these tasks. Till
9 now it wasn't much of a problem because this was normally not done with
10 the task in the run queue, and the task was never put into the wait queue
11 since it doesn't have any timer. But with threading it will become an
12 issue. And not having this already prevents another bug from being fixed.
13
14 Thanks to Christopher for spotting this one. A backport to 1.7 and 1.6 is
15 preferred for safety.
16
17 (cherry picked from commit bd7fc95edbce821f1d7b745a7b75deef4d6b1e27)
18 Signed-off-by: William Lallemand <wlallemand@haproxy.org>
19 ---
20 src/hlua.c | 2 ++
21 1 file changed, 2 insertions(+)
22
23 diff --git a/src/hlua.c b/src/hlua.c
24 index a998860e..67b9458c 100644
25 --- a/src/hlua.c
26 +++ b/src/hlua.c
27 @@ -5948,6 +5948,7 @@ error:
28
29 static void hlua_applet_tcp_release(struct appctx *ctx)
30 {
31 + task_delete(ctx->ctx.hlua_apptcp.task);
32 task_free(ctx->ctx.hlua_apptcp.task);
33 ctx->ctx.hlua_apptcp.task = NULL;
34 hlua_ctx_destroy(&ctx->ctx.hlua_apptcp.hlua);
35 @@ -6226,6 +6227,7 @@ error:
36
37 static void hlua_applet_http_release(struct appctx *ctx)
38 {
39 + task_delete(ctx->ctx.hlua_apphttp.task);
40 task_free(ctx->ctx.hlua_apphttp.task);
41 ctx->ctx.hlua_apphttp.task = NULL;
42 hlua_ctx_destroy(&ctx->ctx.hlua_apphttp.hlua);
43 --
44 2.13.0
45