HomeClusterLabs Projects

Fix: controller: avoid use-after-free when disconnecting proxy IPCs during…

Description

Fix: controller: avoid use-after-free when disconnecting proxy IPCs during shutdown

Previously internal_lrm_state_destroy() directly freed and removed any
relevant proxy entries from proxy_table, which could potentially leave
the proxy IPCs connected and cause use-after-free when
g_main_context_dispatch() -> ... -> remote_proxy_disconnected() was
later called in crmd_exit().

The solution is to make sure any connected proxies get disconnected. So
that remote_proxy_disconnected() will be called and as well remove the
entries from proxy_table.

Details

Provenance
gao-yanAuthored on Mar 23 2023, 2:05 PM
Parents
rP3f2480ac8902: Merge pull request #3055 from nrwahl2/nrwahl2-fix
Branches
Unknown
Tags
Unknown