]> git.kaiwu.me - haproxy.git/commit
MINOR: lua: Protect the common Lua state during a runtime filter deinit
authorChristopher Faulet <cfaulet@haproxy.com>
Wed, 7 Oct 2026 15:03:30 +0000 (17:03 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Fri, 9 Oct 2026 14:17:36 +0000 (16:17 +0200)
commitd26aff11b5dcc9c17b44f8b42436b159a1f3c3c9
tree8fd2d5c16297a2fbedfe23ca0d48d78b8e15e1c2
parente6e2c4c5b761bd576a64c831a9c8c580cea1cc9a
MINOR: lua: Protect the common Lua state during a runtime filter deinit

hlua_filter_deinit_per_thread() releases the filter reference from the
shared Lua state without taking the global lock. This is fine during the
startup and the shutdown, where it is the only user of the state, but
the proxies dynamically created with "add backend" are destroyed at
runtime with "del backend", with their filter instances finalized: their
deinit callback may then run while other threads execute Lua code on the
shared state. Take the global lock when releasing the reference of the
common state, as all the other runtime users of this state do.
src/hlua.c