HomeClusterLabs Projects

Fix: executor: avoid use-after-free upon shutdown

Description

Fix: executor: avoid use-after-free upon shutdown

Upon shutdown of executor, lrmd_drain_alerts() calls
pcmk_drain_main_loop() which calls g_main_context_iteration(). If
there's a pending SIGCHLD signal, it will be processed by
crm_signal_dispatch() -> child_death_dispatch() -> child_waitpid() ->
services__finalize_async_op() -> action_complete(), which accesses the
hash table "rsc_list".

Previously "rsc_list" was destroyed before lrmd_drain_alerts(), which
would cause use-after-free.

Details

Provenance
gao-yanAuthored on Tue, Nov 5, 9:16 AM
Parents
rP49aab998399b: Doc: ChangeLog: update for 2.1.9 release
Branches
Unknown
Tags
Unknown